Friday, November 6, 2015

Set login to people picker column

<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/2013.01/jquery.SPServices-2013.01.min.js"></script>

<script type="text/javascript">
 $(document).ready(function() {
     //Get the current user
     var user= $().SPServices.SPGetCurrentUser();
      //Set all sharepoint 2010 people picker default to current user
     $("div[title='People Picker']").text(user);
  });
</script>

No comments:

Post a Comment