Inputs are cleared from a second form if the first form produced a vallidation error
we ran in to the following Bug:
What is needed:
-A fluid template containing 2 forms (form A and B).
-Both forms are containing values from a stored object
How to reproduce the error:
- Update one form (form A) so that it will produce a validation error
- The other form (form B) will no longer contain the filled in values from the stored object as the formfield viewhelpers search for these in last submitted input array. This array only contains the inputs of the form (form A) which produced the error and thus form B is filled in with empty values
Quickly hacked together (please refer to the attached 3 files)...
Each form is now extended with an unique ID which is checked in the hasValidationErrors method. Thus only the fields of the form producing the error will return true and the fields of other forms are filled in as usual. The ID simply generated by counting how often the form tag was called. There is certainly a better way to handle it but that was the best I could come up with. I hope it helps
No data to display