Jayant Sharma

SharePoint Application Development

  Home  |   Contact  |   Syndication    |   Login
  38 Posts | 0 Stories | 24 Comments | 0 Trackbacks

News

Archives

Post Categories

Sunday, June 22, 2014 #

image

 

<script type="text/javascript" src="/Scripts/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="/Scripts/jquery.SPServices-0.7.2.min.js"></script>

<script type="text/javascript">
$(document).ready(function () { 
  
var FirstName= $().SPServices.SPGetCurrentUser({
    fieldName: "FirstName"
    });var LastName= $().SPServices.SPGetCurrentUser({
    fieldName: "LastName"
    });

var WorkPhone = $().SPServices.SPGetCurrentUser({
    fieldName: "WorkPhone"
    }); 

var Email = $().SPServices.SPGetCurrentUser({
    fieldName: "EMail"   
    });    


$('input[title="First Name"]').attr({value:FirstName});
$('input[title="Last Name"]').attr({value:LastName});
$('input[title=Phone]').attr({value: WorkPhone});
$('input[title=Email]').attr({value:Email });
 
});
</script>

Ref: http://spservices.codeplex.com/

 

Thanks- Jayant