Bug #58921

f:form.* VHs crash if NOT inside f:form but followed by f:form

Added by Aimo Künkel over 6 years ago. Updated over 6 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-05-19
Due date:
% Done:

0%

Estimated time:
Has patch:
No

Description

The f:form.* ViewHelpers work inside of forms and standalone, but they crash if used standalone and they are followed by any fluid form.

This works fine and results in a perfect html select:

<f:form.select name="select" options="{1: 'One', 2: 'Two', 3: 'Three'}" />

This also works fine and results in a submittable form:

<f:form action="some" name="form">
    <f:form.button type="submit">Go!</f:form.button>
</f:form>

This instead (both concatenated) ...

<f:form.select name="select" options="{1: 'One', 2: 'Two', 3: 'Three'}" />

<f:form action="some" name="form">
    <f:form.button type="submit">Go!</f:form.button>
</f:form>

... will throw the following error:
h3. #1243352010: The key "TYPO3\Fluid\ViewHelpers\FormViewHelper->formFieldNames" was already stored and you cannot override it.

I regard this as a bug and propose to let them produce the html select, followed by the submittable form.

I explain it this detailed because i had a discussion in IRC on what a developer would expect the output to be, but i definitely would like to have multiple forms on a page AND multiple independent inputs NOT inside of forms (for UI reasons, for JS handling, ...)

Also available in: Atom PDF