Bug #18427

Required fields within flexform section elements cause Javascript errors

Added by Jeff Segars about 13 years ago. Updated over 2 years ago.

Should have
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


If a flexform uses section elements with required fields, a Javascript error is generated as soon as the form is loaded and that flexform cannot be saved.

I believe this is related to changeset 2628, which made significant enhancements to section handling. To see the error in action, check out the Scoring Tab within the pb_survey plugin.

The error message is "document[TBE_EDITOR.formname][elementName] has no properties". Once the required eval is removed, the Javascript errors go away because the code causing the error is no longer executed.

(issue imported from #M7829)


7829_required_check.diff (1.28 KB) 7829_required_check.diff Administrator Admin, 2008-03-11 23:36
0007829.patch (1.55 KB) 0007829.patch Administrator Admin, 2008-03-17 17:58

Related issues

Related to TYPO3 Core - Bug #18429: required fields in Flexform are not correct marked with Exclamation SignClosed2008-03-12

Is duplicate of TYPO3 Core - Bug #18751: JavaScript error in TBE_EDITOR causes login expired dialogClosedOliver Hader2008-05-06


Updated by Steffen Kamper about 13 years ago

i fixed the JS Error with the patch.

This is only one half. With IRRE the naming of the field differs from record to record so JS has to search in childs for matching field.

For first i returned true in this case and marked it with TODO


Updated by Oliver Hader about 13 years ago

Hm, how can I test/reproduce this?
I fetched pbsurvey v. 1.2.0 from TER but could not find the string "inline" in the whole extension. Thus, I don't understand, where the IRRE factor comes into this game... Please enlighten me! :)


Updated by Steffen Kamper about 13 years ago

Hi Olly,

fine that you stumble also :-)
This technique is new for me, in flexform the element (eg result) is declared as array with section=1, i think this is the part doing the magic.

To reproduce it following steps:
1) got to a page and create a CE with pbsurvey
2) go to scoring tab, add a element and enter a value for scoring
3) save it


Updated by Oliver Hader about 13 years ago

Thanks Steffen. I can reproduce this behaviour resulting in my back-end session getting cleared.
This new technique for flexforms feels like IRRE, but isn't. That's why I stumbled and was astonished how this could be related to IRRE if it isn't defined anywhere in the pbsurvey extension.


Updated by Steffen Kamper about 13 years ago

I would propose to use the patch as first step so it will work (only required will not be checked in this special case)

Secondly the required check in eval script should be enhanced, i have no quick solution herefore, i also miss any documentation about this feature.


Updated by Oliver Hader about 13 years ago

I've attached a new patch which is very similar to Steffen's.
Currently there's no other solution to fix it since it goes much deeper to handle the flexform thingy which ignores nearly any other TYPO3 parts...

Thus, the bugfix is to avoid the JavaScript errors - a real bugfix would be to rewrite Kasper's dynamic flexform fields...


Updated by Oliver Hader almost 13 years ago

Duplicate... ;-)


Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF