Bug #26481

Task #26664: Clean up Form ViewHelpers

Task #26658: Make Form ViewHelpers consistent

hidden fields should be rendered in extra section

Added by Sven-S. Porst over 10 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Should have
Category:
ViewHelpers
Start date:
2011-04-29
Due date:
% Done:

100%

Estimated time:
Has patch:
No

Description

The form.checkbox view helper works in an unexpected way because it creates two, rather than one <input> elements.

This is a problem when using markup like

<label>
  <f:form.checkbox ...>
  Checkbox name
</label>

as one ends up having two <input>s inside the <label> which is invalid HTML. One has to make the effort to create id and for attributes for both tags to get things working correctly. This could be simpler.

In the long term it may be worth considering to add explicit support for <label> tags to the form field view helpers, to encourage label usage by offering straightforward support for it from the templating engine.

UPDATE: The solution would be to render the "automatically generated" hidden fields for checkboxes and select dropdowns in the hidden fields section at the beginning of a form


Related issues

Related to TYPO3.Fluid - Bug #33628: Multicheckboxes (multiselect) for Collections don’t workNeeds FeedbackChristian Müller2012-02-02

Actions
Related to TYPO3.Fluid - Task #13342: f:form.checkbox does only render hidden input for first item of same nameResolvedBastian Waidelich2011-02-24

Actions

Also available in: Atom PDF