I have a couple of people pickers in my custom HTML form in SharePoint 2013. I am trying to auto-populate them with a user. I have the user id numbers like "890", "7789"
<tr><td>First Level Investigator</td><td><div id='srtapeoplepicker'></div></td></tr>
here is where I call the people picker initializer
initializePeoplePicker('srtapeoplepicker', false, 'People Only', 44);
function initializePeoplePicker(peoplePickerElementId, AllowMultipleValues, PeopleorGroup, GroupID) {
// Create a schema to store picker properties and set the properties.
var schema = {};
schema['SearchPrincipalSource'] = 1;
schema['ResolvePrincipalSource'] = 1;
schema['MaximumEntitySuggestions'] = 50;
schema['Width'] = '280px';
schema['AllowMultipleValues'] = AllowMultipleValues;
if (PeopleorGroup == 'PeopleOnly') schema['PrincipalAccountType'] = 'User';
else schema['PrincipalAccountType'] = 'User,DL,SecGroup,SPGroup';
if (GroupID > 0) {
schema['SharePointGroupID'] = GroupID
}
this.SPClientPeoplePicker_InitStandaloneControlWrapper(peoplePickerElementId, null, schema);
}
But how do we auto-populate it with a user?