Bug #18429
closed
required fields in Flexform are not correct marked with Exclamation Sign
Added by Steffen Kamper about 16 years ago.
Updated almost 9 years ago.
Category:
Backend User Interface
Description
In TCEForms required fields are marked with the yellow Exclamation Sign, also the Tabs containing those fields.
If a TCEForm contains a flexform with tabs and required fields, they are not marked.
If there is one required field inside: only complete flexform is marked with Exclamation Sign
If there are more than one required fields inside, no field is marked.
The fields insifde Flexforms are never marked.
If fields in Flexform are IRRE records the required check will fail also because the naming of the field is different then in the form.
to reproduce it look at pbsurvey which has required fields in flexform as IRRE fields
(issue imported from #M7832)
Files
Now i know that this isn't IRRE. It's Kaspers new flexform arrays, unfortunally this is not documented anywhere.
The attached patch is just a beginning, it adds the flexform sheets/tabs to the stack of nested elements.
Next steps:
- add required-icon to each field of a flexform block
- extend the required nested checks to use flexform sheets (=tabs) and fields
- really remove flexform sections (currently they are only hidden and not removed)
- create a better handling for adding/removing dynamic flexform secions
-> add: register some stuff in JavaScript
-> remove: ensure that no other part relies on a removide flexform section
Duplicate of 0013117 witch has some sponsoring
i don't see any sponsoring there ;)
olly did some investigations and i looked to this yesterday too. From my debugs, the flexform field is in the nested stackes. I used this debug in line 202:
if (autoNotify) {
console.log(elementData, elementName);
which showed that the required field in in elementName. Only the elementData is the complete flexform.
Imho this is because of the recursive render of flexforms in t3lib_tceforms.
2 things have to be done:
1) fields in flexform also need the rec_ and cm_ image rendered in front
2) the field has to be added to the stack (see olly's patch)
then the javascript will work as expected and the correct image will be set.
This bug is still present in TYPO3 4.4. The patch is no longer compatible with this version.
When #17122 is fixed, this issue is fixable.
Nothing happend here until today...
We just tested it with the current master and can confirm that this applies also for TYPO3 6.2.
Fields configured with 'eval' is set to 'required' are not marked with exclamation mark and the record can be saved even if the field is not filled with data.
Exception: last input field (see #17122)
It also seems to affect group fields with a configured minitems
value.
The FlexForm can not be saved (JavaScript alert about missing fields pops up) but no exclamation mark is visible.
Alexander Stehlik wrote:
It also seems to affect group fields with a configured minitems
value.
The FlexForm can not be saved (JavaScript alert about missing fields pops up) but no exclamation mark is visible.
I can confirm this too on TYPO3 6.2.1, but I can see the exclamation marks!
(If I remove the minitems from the flexform, the issue is gone)
Alexander Stehlik wrote:
It also seems to affect group fields with a configured minitems
value.
The FlexForm can not be saved (JavaScript alert about missing fields pops up) but no exclamation mark is visible.
I can also confirm this behave of the validation issue with filefields with an minitems of 1. I found another bug #47372 which fixes the same error with TCA-objects, but the fix did not work for flexforms.
- Description updated (diff)
- Category set to Backend User Interface
- Status changed from Accepted to Needs Feedback
- Target version deleted (
0)
- Is Regression set to No
What the state of this issue?
Does it still happen with TYPO3 CMS 6.2.14?
Alexander Opitz wrote:
What the state of this issue?
Does it still happen with TYPO3 CMS 6.2.14?
Yes. There was no improvement in TYPO3 6.2 regarding this bug.
this will probably not 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.
- Status changed from Needs Feedback to New
- TYPO3 Version changed from 4.2 to 6.2
- PHP Version changed from 5.2 to 5.3
- Status changed from New to Closed
Also available in: Atom
PDF