Marc,
My apologies, great suggestion. Misunderstood from my end. You're right, getting the ID is absolutely key, and actually using just the ID alone works perfectly well.
A content query web part pulled through the people and their IDs.
A variable was created to look at the people container where the title matched on the value entered into the text field and pull through the ID attribute. This variable was then used to populate the value field.
An additional thanks to front end guru Leigh Docking.
My apologies, great suggestion. Misunderstood from my end. You're right, getting the ID is absolutely key, and actually using just the ID alone works perfectly well.
A content query web part pulled through the people and their IDs.
A variable was created to look at the people container where the title matched on the value entered into the text field and pull through the ID attribute. This variable was then used to populate the value field.
An additional thanks to front end guru Leigh Docking.
var peopleID = $('.people[title="' + $('#person-wrapper').val() + '"]').attr('sharepointid');
$().SPServices({
operation: "UpdateListItems",
ID: userInformation.listitemid,
async: true,
batchCmd: "Update",
listName: "People",
valuepairs: [
["People", peopleID],
]