Skip to main content
2 of 2
added to answer
harshal gite
  • 1.5k
  • 1
  • 13
  • 24

You can do this using the functions provided by SharePoint itself. The following line gives you the id of the top level element of your people picker (replace "YourFieldInternalName" by internal name which you have given).

var pickerDivID = WPQ2FormCtx.ListSchema.YourFieldInternalName.TopLevelElementId

If this does not work, WPQ2FormCtx might not be the correct object. Just open browser console and type WPQ or FormCtx, you will get some like WPQ2FormCtx or WPQ4FormCtx. Use that in the above statement.

You can use this ID wherever you want. To get values from peoplepicker as shown below.

var pickerObject = SPClientPeoplePicker.SPClientPeoplePickerDict[pickerDivID];

This object contains all the information in the people picker column of the form.

Open the form in new page or by going to top ribbon -> list -> default new form. Try getting that wpformctx here. And use that one in the code.

Ideally it should work with infowise customization as well because SharePoint fields remain the same.

harshal gite
  • 1.5k
  • 1
  • 13
  • 24