How to Set Client People Picker Value in SharePoint 2013?

Client People Picker is newly introduced in SharePoint 2013. People picker is a SharePoint Control to browse and select the sharepoint users or groups in an organisation or Active Directory. The client people picker is an HTML and JavaScript control that provides cross-browser support.

 

<script type=”text/javascript” src=”../../SiteAssets/jquery-1.11.1.min.js”></script>
<script type=”text/javascript” src=”../../SiteAssets/jquery.SPServices-0.7.2.min.js”></script>
<script type=”text/javascript”>
$(document).ready(function () {
ExecuteOrDelayUntilScriptLoaded(function () {
setTimeout(function () {
var Div = $(“[id$=’ClientPeoplePicker’][title=’Name’]”);
var ppEdit = Div.find(“[title=’Name’]”);
var spPP = SPClientPeoplePicker.SPClientPeoplePickerDict[Div[0].id];

ppEdit.val(“yourdomain\\youruser”);
spPP.AddUnresolvedUserFromEditor(true);
}, 2000);
}, “clientpeoplepicker.js”);

});

</script>

In this blog, I have talked about clearing the people picker value in Sharepoint 2013

Happy SharePointing Folks!  Happy Coding!!

 

Leave a Reply

Your email address will not be published. Required fields are marked *