I have a custom list in which I have applied JSLink on Person/Group field in NewForm.aspx
, my code works fine to render the field but when I click on submit button, I am returning value. <userId>;#<LoginName>
to SharePoint in statement like below:
formCtx = SPClientTemplates.Utility.GetFormContextForCurrentField(ctx);
formCtx.registerGetValueCallback(formCtx.fieldName, function () {
return "1;#xxx yyy;";
});
But I am not getting any value stored after the item is saved.
How do I return the value to Person field?
Note : The field is single allow value.
i:<userId>#.w|<domain>\<userLoginName>
, but still not working.