Using dictionaryEntries in SPFindPeoplePicker

Nov 8, 2012 at 3:08 PM

I am trying to use SPFindPeoplePicker to populate a users email address. I can't figure out what syntax to use to extract values from the dictionaryEntries array. Please help?

var saPPG = $().SPFindPeoplePicker({
peoplePickerDisplayName: "Site Admin"
}); 
					 
$("#"+saPPG.contents.attr("id")).focusout(function(){
$("input[title='Access Request Email']").val(saPPG.dictionaryEntries["WorkEmail"]);
});

Thanks.

Coordinator
Nov 21, 2012 at 4:54 AM

dictionaryEntries is an array of values. Here's some sample code I used in testing:

var salesRep = $().SPFindPeoplePicker({
 peoplePickerDisplayName: "Sales Rep", // The displayName of the People Picker on the form
 valueToSet: "DOMAIN\\bobsmith"
});

for(i=0; i < salesRep.dictionaryEntries.length; i++) {
 alert(salesRep.dictionaryEntries[i].Email);
}

M.