Feature #3661
<f:form.checkbox and <f:form.radio missing?!
Status: | Resolved | Start date: | 2009-06-14 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Bastian Waidelich | % Done: | 100% |
|
Category: | ViewHelpers | |||
Target version: | - | |||
Has patch: |
Description
It would be nice to have <f:form.checkbox and <f:form.radio available in a Fluid-Template.
<input type="radio" name=...> is possible but one can't take advantage of arguments like options="{myarray}" and property="..." as possible with the <f:form.select ViewHelper.
Associated revisions
[FEATURE] Fluid (ViewHelpers): Added checkbox and radio form viewHelpers. Resolves #3661
[FEATURE] Fluid (ViewHelpers): Added fieldNamePrefix to FormViewHelper as a preparation for namespaced forms. Relates to #3717
[TASK] Fluid (ViewHelpers): Tweaked and refactored FormViewHelper by splitting up the huge render() method into smaller chunks
[TASK] Fluid (ViewHelpers): Refactored form field viewHelpers by splitting AbstractFormViewHelper into AbstractFormViewHelper and AbstractFormFieldViewHelper
[TASK] Fluid (Tests): Streamlined some viewHelper tests and added mock request to ViewHelperBaseTestcase to ease creation of viewHelper unit tests
[TASK] Fluid (Tests): "Forwardported" a unit test from Jochen (in TemplateParserTest)
History
#1 Updated by Steffen Ritter about 6 years ago
Marcel R. wrote:
It would be nice to have <f:form.checkbox and <f:form.radio available in a Fluid-Template.
<input type="radio" name=...> is possible but one can't take advantage of arguments like options="{myarray}" and property="..." as possible with the <f:form.select ViewHelper.
It's not intuitive, but technically I would say it's <f:form.select and there should be an option renderType=select|combobox|radio|checkbox
#2 Updated by Jochen Rau about 6 years ago
- Status changed from New to Accepted
- Priority changed from Could have to Should have
#3 Updated by Bastian Waidelich about 6 years ago
- Assigned To set to Bastian Waidelich
#4 Updated by Bastian Waidelich about 6 years ago
- Project changed from Extbase MVC Framework to TYPO3.Fluid
- Category deleted (
432)
#5 Updated by Bastian Waidelich about 6 years ago
- File 3661.patch added
- Category set to ViewHelpers
- Branch set to v4 + v5
Attached is a patch that implements a simple checkbox & radio viewhelper.
Note:
Something like
<f:form.select renderType="checkbox" />does not make sense until we have support for "template based" view helpers in my eyes because client A wants it to be:
<dl> <dt><label for="foo">Foo</label></dt> <dd><input type="checkbox" value="foo" name="foos[]" id="foo" /></dd> <dt><label for="bar">Bar</label></dt> <dd><input type="checkbox" value="bar" name="foos[]" id="bar" /></dd> </dl>
and client B:
<ul> <li><label><input type="checkbox" value="foo" name="foos[]" id="foo" /> Foo</label></li> <li><label><input type="checkbox" value="bar" name="foos[]" id="bar" /> Bar</label></li> </ul>
but we're working on a solution for that!
#6 Updated by Bastian Waidelich almost 6 years ago
- File 3661_tx_fluid_checkbox_and_radio_viewhelpers.patch added
- File 3661_Fluid_checkbox_and_radio_viewhelpers.patch added
Attached is a patch that implements a simple checkbox/radio viewhelper. Once for Fluid (package) and once for tx_fluid (extension).
This will be committed to trunk after release of FLOW3 1.0.0 alpha3.
#7 Updated by Bastian Waidelich almost 6 years ago
- Status changed from Accepted to Resolved
- % Done changed from 0 to 100
Applied in changeset r3109.