0

Good Day..!

I have the requirement to update the another field value, when "People Picker" field gets filled up. For this i need to put my code under the "People Picker" changed event, how can i catch this event?
Please let me know.

Note: I am asking this for the SharePoint 2016 Standard Edition People Picker not 2013.

1 Answer 1

0

After i did the research on the 2016 "PeoplePicker", in the browser level,
I came to know that, it has one "SPAN" tag which is used to save "Resolved List items".
It will not have any child elements, when "PeoplePicker" is Empty.
It will create the child elements using the "ResolvedList", when "PeoplePicker" gets filled up.

So i planned to catch that "SPAN" tag innerhtml changed event, and did using the below code:

> $("div[title*='People Picker Name'] .sp-peoplepicker-resolveList").on('DOMSubtreeModified',function(){
> setTimeout(function(){  
> alert('People Picker Values Changed');  },
> 1000); });

Notes: Here why i've used timeout means, this event will fire suddenly before the value updates.

Any other approach better than this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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