Page 1 of 1

e_formFields_changed event not called until field loses focus

Posted: Tue Jun 04, 2019 4:47 pm
by coblejesse
Hi Alex,

The e_formFields_changed event is not getting called until the field loses focus. Is there a way to have this or another event called right when the field is being changed instead of on the lost focus?

Also, when user adds an image to the image field, the e_formFields_changed event never gets fired at all. Thanks for all your help.

Re: e_formFields_changed event not called until field loses focus

Posted: Wed Jun 05, 2019 9:15 am
by Sasha - Tracker Dev Team
Hello Jesse,

From what I see, adding the image to field calls the op_annot_setData operation that has the field's Widget as an input. You can catch the before or after operation execute event and see whether it's an operation that I mentioned and then see whether the input is a widget. If so, then it means that the field was changed somehow.

As for the field modification only after the focus lost - well it's done like that so that there won't be a multiple operations call when typing something into the fields. Alternatively, you can set the Readonly property for fields to prohibit the edit at all.

Cheers,
Alex