#78349CheckFormViewHelper renders html different when an validation error occurred
Description
I have the following situation:
I have multiple check boxes which are required.
Like this:
<f:for each="{organisations1}" as="organisation1">
<label for="checkbox-{organisation1.uid}" class="menu-checkbox">
<f:form.checkbox id="checkbox-{organisation1.uid}" property="organisation1" value="{organisation1.uid}" />
{organisation1.title}
</label>
</f:for>
Everything works fine until i get a validation error. After that the check boxes are no longer correct:
Should be:
tx_ndecompanies_companies[company][organisation1][]
But is:
tx_ndecompanies_companies[company][organisation1]
As you see after a validation error the form is missing the [].
So the user is no longer able to send the form.
To fix that i use:
<f:form.checkbox id="checkbox-{organisation1.uid}" property="organisation1" value="{organisation1.uid}" multiple="1" />
So with multiple=1 it is working.
But for me it is a bug, that it is working without multiple=1 when there is no validation error and not when there is a validation error.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 1
-
Riccardo De Contardi commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-05-11T08:56:37+00:00" > 05/11/26, 08:56 </span>
I feel sorry, but after 9 years without an advancement, I close this issue.
I can’t say what was the documentation when the issue was opened but on the current TYPO3 documentation there is a section called “Multiple checkboxes with the same property”
see https://docs.typo3.org/other/typo3/view-helper-reference/main/en-us/Global/Form/Checkbox.html#typo3-fluid-form-checkbox-multiple
and I guess that the “multiple” attribute is necessary when dealing with multiple checkboxes, anyway.
If you think that this is the wrong decision or have a step-by-step guide about how to reproduce this issue, please open a new issue with a reference to this one.
Sorry again for the inconvenience.