[TYPO3-core] Bug in FormEngine with "requestUpdate" and multiple select fields
François Suter
fsu-lists at cobweb.ch
Mon May 12 17:56:10 CEST 2014
Hi all,
I just stumbled on a big in FormEngine and I would like to discuss
possible solutions before submitting a patch.
The situation is the following: I have a select-type field with multiple
choices possible, i.e. one which gets displayed with the two <select>
elements side-by-side, and that field is registered with "requestUpdate".
When an item is selected in the right-hand selector, the update popup
comes up. As soon as I click the "OK" button, the form is submitted. But
there's also on onclick event on that field, which is supposed to pass
the element that was selected on the right-hand side to the left-hand
side. And that script does not have time to do its work, because the
form has already been submitted. Hence the select field stays empty.
A very simple solution is to set an absolutely minimal timeout in
TBE_EDITOR.submitForm() (10 milliseconds is enough) to give time to the
other script to execute. Of course this is far from elegant. What we
would need is some kind of feedback from the FormEngine JS object, so
that TBE_EDITOR knows that it's safe to submit. But that rather complex,
especially since currently the FormEngine script is anyway fired after
the submission. Does anyone have other ideas?
Cheers
--
Francois Suter
Work: Cobweb Development Sarl - http://www.cobweb.ch
TYPO3: Help the project! - http://typo3.org/contribute/
Appreciate my work? Support me -
http://www.monpetitcoin.com/en/francois/support-me/
More information about the TYPO3-team-core
mailing list