Cause the change event

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
Cloud.Ed
Posts: 40
Joined: Fri Dec 04, 2015

08 Aug 2017

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.

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

08 Aug 2017

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.
Cheers

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests