Skip to main content

I want to handle the JavaScript event which is fired when a user is added to people picker control. onchange event does not work for people picker.

Try this:

frmCurrMentor = variable used for JavaScript on the form

nameMentor = JavaScript name for the list item

MentorValueChanged() = name of the function I want executed when the change event occurs

 

NWF.FormFiller.Events.RegisterAfterReady(function() {

     frmCurrMentor = new NF.PeoplePickerApi("#"+nameMentor);

     frmCurrMentor.added(function(){MentorValueChanged()});

});


Thanks.

I tried but it throws an error on load and does not call the function MentorValueChanged()

NF.PeoplePickerApi is not a constructor

Do I have to add any reference to any Js for the same?


Reply