I'm trying to replace all of the "bad" old-style people pickers on our custom new/edit forms with the new good client-people pickers.
With this thread I came up with the idea to use jquery to find all the bad people pickers on the form, hide them, create good people pickers in the same spot, and copy the info over from the hidden bad people pickers. Then on save use PreSaveAction() to copy any changes from the good people pickers back into the hidden bad ones. This is working well
But I realized there are several configuration things like, "allow multiple entries" or "limit choices to this group" and I wasn't sure how to properly configure the new good people picker to match the existing site column.
In this thread helped me figure out how to retrieve all the information about people columns in the list. I'm using this REST call.
https://<sitename>/_api/web/lists/getbytitle('listname')/Fields?$filter=Hidden eq false and ReadOnlyField eq false and TypeDisplayName eq 'Person or Group'
And I can find the appropriate values for each people column, but now I can't figure out how to identify which bad people picker goes with which site column. Clearly behind the scenes SP has some way to know which bad people picker is writing to which column, but I can't figure out how it works.
For example I have two bad-pickers one for AssignedTo and the other AssigneTo. There doesn't appear to be anything in the DOM that says which is which. So when I pull back the configuration information for the column using REST I only have a 50-50 chance of getting it right.
So how can I match up the details with the correct people picker?
This whole thing seems really round about way to get a custom New/Edit form, so if there is a better way to do this I would appreciate any input. But it would also be nice to know how to match up any given input on a form with the column it belongs to.