1

How is get value People Picker JQuery SP 2013? Isn't work my code ((

enter image description here

function _spBodyOnLoad(){
var pickerPeople = SPClientPeoplePicker.SPClientPeoplePickerDict['User'].GetAllUserInfo();
if (pickerPeople.length > 0) {
    alert("User: " + pickerPeople[0].DisplayText);
} }
3

Following code might helps you

var ClientPickerDict = this.SPClientPeoplePicker.SPClientPeoplePickerDict;
    // Get the people picker object from the page.
    for (var propertyName in ClientPickerDict) {
        peoplePicker = ClientPickerDict[propertyName];
    }
    if (peoplePicker != null) {
        // Get information about all users.
        var users = peoplePicker.GetAllUserInfo();
        var userInfo = '';
        for (var i = 0; i < users.length; i++) {
            var user = users[i];
            userInfo += user['Key'] + ";#";
        }
        return userInfo;
    }
  • var ClientPickerDict = this.SPClientPeoplePicker.SPClientPeoplePickerDict['User'] error is null? – Fox Nov 28 '18 at 11:26
  • How did you bind people picker? did you use sppeoplepicker.js? – Hitendra Solanki Nov 28 '18 at 11:27
  • I'm using sppeoplepicker.js return is blank – Fox Nov 28 '18 at 11:34

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.