Page 1 of 1

Cause the change event

Posted: 08 Aug 2017
by Cloud.Ed
We are struggling with the script to fire a change event on a standard text field in the edit form. From what we found in the forum we tried:

fd.field('Change_x0020_Order_x0020_Price').control()._el().find('input').trigger('change');
fd.field('Change_x0020_Order_x0020_Price').control().trigger('change');
fd.field('Change_x0020_Order_x0020_Price').control()._el().find('input').click();
fd.field('Change_x0020_Order_x0020_Price').Change()

No change gets fired, please help.

Re: Cause the change event

Posted: 08 Aug 2017
by Nikita Kurguzov
You can use something like this:

Code: Select all

fd.field('Change_x0020_Order_x0020_Price').control()._el().find('input').trigger('change');
But in order to detect change, you also need something like this:

Code: Select all

fd.field('Change_x0020_Order_x0020_Price').control()._el().find('input').on('change', function() {
	//Your code here
});
Sadly, other methods do not work at the moment.