Auto Populate username in list form using JavaScript Sharepoint default new form/edit form  under edit form web parts


2.add the script editor web part on the web page.

script editor on edit snippet inside script editor webpart and add the below code


click on insert. after click stop editing page.

now whenever you open new form it will have current user as populated in peoplepicker.


<script src="/my/Style%20Library/jquery-1.11.2.js"></script>
<script language="javascript" src="/my/Style%20Library/jquery.SPServices-0.6.2.js" type="text/javascript">
<script language="javascript" type="text/javascript"> 
$(document).ready(function() { 
var userName= $().SPServices.SPGetCurrentUser(); 

Note.Make sure page will have reference of jQuery.SPServices-0.6.2.js and jQuery-1.11.2.js files. you can add any where in web and add reference to a page.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s