Hi,
i'm developing dynamic forms with AEM Forms Designer (6.5.0.20190320.3.935878).
I noticed, that change events on dropdown lists fire twice when changing a value.
This doesn't happen in Acrobat.
Could you tell me, what's going wrong here?
And if possible, any idea on scripting to prevent this.[attachment=0]simpleDropdown.pdf[/attachment]
Attached is a simple pdf with only one dropdown list, where this happens.
regards
jones
DropDown: Change event fires twice
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
DropDown: Change event fires twice
- Attachments
-
- simpleDropdown.pdf
- (571.02 KiB) Downloaded 10 times
- Tracker Supp-Stefan
- Site Admin
- Posts: 17903
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: DropDown: Change event fires twice
Hello Jones,
This is an XFA form - so I can't see the full JS besides that field in the Editor.
Please check if you can on your side when this event is set to file - and try to only fire it on e.g. the "willCommit" event. It should then only show up once.
And I will ask our devs to take a look in your sample.
Kind regards,
Stefan
This is an XFA form - so I can't see the full JS besides that field in the Editor.
Please check if you can on your side when this event is set to file - and try to only fire it on e.g. the "willCommit" event. It should then only show up once.
And I will ask our devs to take a look in your sample.
Kind regards,
Stefan
Re: DropDown: Change event fires twice
Hi Stefan,
thanks for your quick reply.
The provided PDF was created from scratch. Just the drowdown list incl values added.
No other JS code than the app.alert(this.name + ": change event fires"); in the change event of
the dropdown list inside.
Unfortunately i need JS code inside change events in other dynamic forms.
E.g. users have to confirm the change, as this will change occurence of parts of the form and also
delete/change data.
So using events like willCommit isn't an option.
regards
jones
thanks for your quick reply.
The provided PDF was created from scratch. Just the drowdown list incl values added.
No other JS code than the app.alert(this.name + ": change event fires"); in the change event of
the dropdown list inside.
Unfortunately i need JS code inside change events in other dynamic forms.
E.g. users have to confirm the change, as this will change occurence of parts of the form and also
delete/change data.
So using events like willCommit isn't an option.
regards
jones
- Tracker Supp-Stefan
- Site Admin
- Posts: 17903
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: DropDown: Change event fires twice
Hello Jones,
Thanks for the additional details!
I've asked a colleague from the dev team working on JS to take a look - and he has already confirmed he will do that.
In the mean time you can try to see if this works (as a workaround):
This should make it so that this alert is only fired once.
Kind regards,
Stefan
Thanks for the additional details!
I've asked a colleague from the dev team working on JS to take a look - and he has already confirmed he will do that.
In the mean time you can try to see if this works (as a workaround):
Code: Select all
if(event.willCommit){
app.alert(this.name + ": change event fires");
}
Kind regards,
Stefan
Re: DropDown: Change event fires twice
Hi,
as far as i know, willCommit is a method/property of AcroForms.
As I'm working with AEM Forms Designer, this isn't available for me.
Please correct me, if I'm wrong.
regards
jones
as far as i know, willCommit is a method/property of AcroForms.
As I'm working with AEM Forms Designer, this isn't available for me.
Please correct me, if I'm wrong.
regards
jones
- Tracker Supp-Stefan
- Site Admin
- Posts: 17903
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: DropDown: Change event fires twice
Hello Jones,
It might indeed be different - XFA forms are quite more complex, and unfortunately the documentation for them is not public ('thanks' Adobe) - so our devs are kind of reverse engineering support for such XFA forms, but I myself have a much more limited access to what is available in them. I hope I will have some further feedback from our dev team for you shortly!
Kind regards,
Stefan
It might indeed be different - XFA forms are quite more complex, and unfortunately the documentation for them is not public ('thanks' Adobe) - so our devs are kind of reverse engineering support for such XFA forms, but I myself have a much more limited access to what is available in them. I hope I will have some further feedback from our dev team for you shortly!
Kind regards,
Stefan