Bug #31711

Multiple FORM Elements on the same page

Added by Niki Mueller over 10 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2011-11-09
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.6
PHP Version:
5.3
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:

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


Related issues

Has duplicate TYPO3 Core - Bug #34646: form sysext can't handle more than 1 form with validation per page (with patch)ClosedPatrick Broens2012-03-07

Actions
#1

Updated by Niki Mueller over 10 years ago

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.

#2

Updated by Mr. Hudson over 10 years ago

  • 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

#3

Updated by Mr. Hudson over 10 years ago

Patch set 2 of change If4842a77fd7bfb3da62dbc3d79de01be88c708fd has been pushed to the review server.
It is available at http://review.typo3.org/6624

#4

Updated by Niki Mueller over 10 years ago

Uploaded new Patch-Set because of redundant whitespaces.

#5

Updated by Mr. Hudson over 10 years ago

Patch set 3 of change If4842a77fd7bfb3da62dbc3d79de01be88c708fd has been pushed to the review server.
It is available at http://review.typo3.org/6624

#6

Updated by Niki Mueller over 10 years ago

Removed unused function getRules();

#7

Updated by Mr. Hudson over 10 years ago

Patch set 4 of change If4842a77fd7bfb3da62dbc3d79de01be88c708fd has been pushed to the review server.
It is available at http://review.typo3.org/6624

#8

Updated by Xavier Perseguers over 10 years ago

  • Target version changed from 4.6.1 to 4.6.2
#9

Updated by Gerrit Code Review over 10 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/6624

#10

Updated by Gerrit Code Review over 10 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/6624

#11

Updated by Gerrit Code Review over 10 years ago

Patch set 7 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/6624

#12

Updated by Xavier Perseguers over 10 years ago

  • Target version deleted (4.6.2)
#13

Updated by Gerrit Code Review over 10 years ago

Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/8920

#14

Updated by Niki Mueller over 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#15

Updated by Benni Mack almost 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF