Bug #17122
closedflexform <eval>required</eval> on type "input" applies only on last input-field
0%
Description
can anyone confirm this?
Could be a problem in the array-creation of $this->requiredFields in class.t3lib_tceforms.php in the function getSingleField_typeInput where keys will be overwritten . . .
e.g.
data[tt_content]3[pi_flexform][data][sDEF][lDEF][ZXlogin][vDEF]
will be overwritten by:
data[tt_content]3[pi_flexform][data][sDEF][lDEF][ZXpasword][vDEF]
the result ist that only the field "ZXpassword" will be evaluated as required
(issue imported from #M5226)
Files
Updated by Luc Muller almost 17 years ago
I got the same problem.
More, with a localization of a flexcontent.
Only de LAST localisation of the LAST input is really required.
otherfields can be bypassed from the moment the LAST localization of the last input is filled correctly.
Updated by Christian Weiske almost 12 years ago
- File ext_emconf.php ext_emconf.php added
- File ext_tables.php ext_tables.php added
- File flexform_pi1.xml flexform_pi1.xml added
- Target version deleted (
0)
I can confirm this with TYPO3 6.0 (master, last commit e5d2ba5e).
Put the three attached files into typo3conf/ext/flexformtest/
, enable the extension, add the plugin to a page and try to save.
TYPO3 will show an error message when both or only the second field is empty. It will not show an error message if the second input is filled out, but the first is empty - although both are required.
Updated by Christian Weiske almost 12 years ago
In typo3/sysext/backend/Classes/Form/FormEngine.php
, method getSingleField_typeInput
is called. It calls
registerRequiredProperty($type, $name, $value)
with
("field", "tt_content_254_pi_flexform", "data[tt_content][254][pi_flexform][data][sDEF][lDEF][field_input1][vDEF]")
This method registers the required field under its name:
$this->requiredFields[$name] = $value;
Now for both fields, the name is the same (tt_content_254_pi_flexform
), causing the requirement for the first field to be overwritten by the second one.
Updated by Gerrit Code Review almost 12 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17918
Updated by Gerrit Code Review almost 12 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17918
Updated by Gerrit Code Review over 11 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17918
Updated by most wanted almost 11 years ago
We just tested it with the current master and can confirm that this applies also for TYPO3 6.2.
Updated by Armin Vieweg over 9 years ago
What about this issue? Idle for one year, now.
Updated by Markus Klein over 9 years ago
- Description updated (diff)
- Category set to Backend User Interface
- Status changed from Under Review to Accepted
- Priority changed from Should have to Must have
- Is Regression set to No
Since the patch was abandoned, I reset the ticket status
Updated by André Müller over 9 years ago
I can confirm this error. It doesn't depend on the input fields. I created elements with DCE and flux and they have the same error. Four required input fields and only the last returns an error. There is a gist https://gist.github.com/muex/e72b44c3c6bfd485e2cf with two fields and they don't have the same name, as anyone mentioned before.
Updated by Christian Kuhn over 9 years ago
this will probably not be fixed in 6.2 anymore. there was a lot of effort in 7 to improve the required handling and it is not possible to backport this stuff to 6.2.
verified: this is fixed in 7, but will not be changed in 6.2. i'll close the issue as 'won't fix' for 6.2 now.
Updated by Christian Kuhn over 9 years ago
- Status changed from Accepted to Closed