on change for people picker
Hello,
I would like to have an onChange for a person field in edit form. (Office 365)
fd.field ('People_Picker_Column'). change (function () {
alert("has been changed");
fd.field('Change_Owner_Teammember_Approver').value('text');
});
The onChange function works too. But, when I call the edit-form, sharepoint first writes the person's internal name and converts it to the display form. This triggers an onChange, which I do not want.
How can I adjust that?
Thanks!
I would like to have an onChange for a person field in edit form. (Office 365)
fd.field ('People_Picker_Column'). change (function () {
alert("has been changed");
fd.field('Change_Owner_Teammember_Approver').value('text');
});
The onChange function works too. But, when I call the edit-form, sharepoint first writes the person's internal name and converts it to the display form. This triggers an onChange, which I do not want.
How can I adjust that?
Thanks!
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Hello, RMIC!
Yes, it seems to trigger change when the Edit form loads and even checking if the field is ready or not does not seem to help.
But it works with a simple timeout like this:
Yes, it seems to trigger change when the Edit form loads and even checking if the field is ready or not does not seem to help.
But it works with a simple timeout like this:
Code: Select all
fd.field('User').control('ready', function() {
setTimeout(function(){
fd.field('User').change(function() {
alert("Has changed");
});
}, 1000)
});
Cheers
-
- Information
-
Who is online
Users browsing this forum: No registered users and 7 guests