0

I have a Edit Form created for the List using SharePoint designer. In the Edit Form, when I update my People picker field and click on save button it doesn't save my changes. Solution in the below link is been referred to save the people picker value in Edit Form

ClientPeoplePicker control in custom List Form

The above solution worked for the New Form, but doesn't work for the Edit Form. Below is the code for the reference

People Picker Code

<div style="display:none">
    <SharePoint:FormField runat="server" id="_START_Field_x0020_Name_END_" ControlMode="Edit" FieldName="Field_x0020_Name" />
</div>
<SharePoint:ClientPeoplePicker runat="server" ClientIDMode="Static" AutoFillEnabled="True" ID="Field_x0020_Name" Title="Field Name" ValidationEnabled="True" PrincipalAccountType="User" Rows="1" AllowMultipleEntities="True" CssClass="ms-long ms-spellcheck-true" />

JavaScript code used to copy the values from New People Picker to Old People Picker.

for (var key in SPClientPeoplePicker.SPClientPeoplePickerDict) {
         var pickerObj = SPClientPeoplePicker.SPClientPeoplePickerDict[key];
         // drop the _TopSpan
         var customID = key.substr(0, key.length -  8);
         $('div[id*="_START_' + customID + '_END_"]').html(pickerObj.GetAllUserKeys());
    }

While debugging I found that the values getting copied in the old People Picker are only the keys for example: i:0#.f|membership|user@example.com

But when I resolve the old people picker keys using check names button and save, the field gets updated.

How can I resolve the the keys added in old People Picker field to update the field.

I tried searching around, but didn't found any solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.