Bug #31711
closed
Multiple FORM Elements on the same page
Added by Niki Mueller about 13 years ago.
Updated about 6 years ago.
Description
If you have more than one FORM Element on the same page it is not possible to send all of them. Only the first one works.
If you want to send the second one, for example, the rules for the validation are not resetted.
The Problem is that the instance of the Tx_Form_System_Validate is used as singleton as you can see in the setRules function in the form/Classes/Domain/Factory/Typoscript.php class (Line: 361).
If you clean the rules right after this Line it works with several forms on the same page.
My suggestion is to reset the rules array in the constructor of the Tx_Form_System_Validate class.
Best regards,
Niki Müller
I worked out a better solution for this Bug.
The following patch changes the arrays $rules, $messages and $errors in the Tx_Form_System_Validate class, using the current
form-prefix as key, allowing for validation of several different forms on one page.
- Status changed from New to Under Review
Patch set 1 of change If4842a77fd7bfb3da62dbc3d79de01be88c708fd has been pushed to the review server.
It is available at http://review.typo3.org/6624
Patch set 2 of change If4842a77fd7bfb3da62dbc3d79de01be88c708fd has been pushed to the review server.
It is available at http://review.typo3.org/6624
Uploaded new Patch-Set because of redundant whitespaces.
Patch set 3 of change If4842a77fd7bfb3da62dbc3d79de01be88c708fd has been pushed to the review server.
It is available at http://review.typo3.org/6624
Removed unused function getRules();
Patch set 4 of change If4842a77fd7bfb3da62dbc3d79de01be88c708fd has been pushed to the review server.
It is available at http://review.typo3.org/6624
- Target version changed from 4.6.1 to 4.6.2
- Target version deleted (
4.6.2)
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF