Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11508

People picker default current logged in user

$
0
0

I have two people picker site columns(Accountant and Manager) on newform.aspx page, I am using the following SPServices code to default current logged in user to Accountant field and it is working great, But it is also defaulting in Manager field, which I don't want. Any idea? or is there any other alternate way to do it?

 $(document).ready(function(){

 var userName = $().SPServices.SPGetCurrentUser({
  fieldName: "Title"
 });
 
 $("textarea[title='People Picker']").val(userName);
 $("div[title='People Picker']").text(userName);

});

Thanks,

John


Viewing all articles
Browse latest Browse all 11508

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>