How to trigger change event on field
Posted: 31 Jul 2017
Hi,
I have a form where many fields get filled in automatically from various AJAX requests. Upon returning and filling in their values, I need to trigger the change event on those fields, in order to complete more logic.
Currently setting the value of a FD field doesn't trigger the change event, nor does using the jquery style fd.field(fieldname).change(), or fd.field(fieldname).control()._el().change()
I thought that one of them would do it, but I can't seem to programmatically trigger the event. The only way I can think of doing it is attaching new functions as properties to the fd objects that require updates and manually calling that function when I update them, but if the functionality is already there I would rather not hack it like that.
What do I need to do in order to trigger the fd change event programmatically?
I have a form where many fields get filled in automatically from various AJAX requests. Upon returning and filling in their values, I need to trigger the change event on those fields, in order to complete more logic.
Currently setting the value of a FD field doesn't trigger the change event, nor does using the jquery style fd.field(fieldname).change(), or fd.field(fieldname).control()._el().change()
I thought that one of them would do it, but I can't seem to programmatically trigger the event. The only way I can think of doing it is attaching new functions as properties to the fd objects that require updates and manually calling that function when I update them, but if the functionality is already there I would rather not hack it like that.
What do I need to do in order to trigger the fd change event programmatically?