#JQuery to populate the name of current logged in user to a column in a SharePoint list:
<script src="/sites/rndsite/Style%20Library/jquery-1.10.2.min.js" type="text/javascript"></script><script src="/sites/rndsite/Style%20Library/jquery.SPServices-0.7.2.min.js" type="text/javascript"></script><script src="/sites/rndsite/Style%20Library/jquery.SPServices-2013.01.min.js" type="text/javascript"></script><script language="javascript" type="text/javascript">
$(document).ready(function() {
alert("Hi");// this is only for testing
var user= $().SPServices.SPGetCurrentUser({fieldName: "Name"});
alert(user);// this is only for testing
$().SPServices.SPFindPeoplePicker({
peoplePickerDisplayName: "firstapprover",
valueToSet: user,
checkNames: true
});
alert("hello india");// this is only for testing
});</script>
very good ...keep it up
ReplyDelete