[FEATURE] ViewHelpers f:form.select.option and f:form.select.optgroup
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Documentation / Changelog / master / Feature-29399-OptionViewHelperAndOptgroupViewHelperForUseWithSelectViewHelper.rst
1 .. include:: ../../Includes.txt
2
3 =======================================================================================
4 Feature: #29399 - OptionViewHelper and OptgroupViewHelper for use with SelectViewHelper
5 =======================================================================================
6
7 See :issue:`29399`
8
9 Description
10 ===========
11
12 Allows manually defining all options and optgroups for
13 the f:form.select parent field as tag contents of the
14 select field. The added ViewHelpers are TagBasedViewHelpers
15 which means they support all standard HTML attributes.
16
17 Note that while tag content rendering is now supported,
18 it is *STILL* not possible to create ``<option>`` tags
19 manually - you *HAVE* to use the form fields!
20
21 Example:
22
23 .. code-block:: html
24
25 <f:form.select name="myproperty">
26 <f:form.select.option value="1">Option one</f:form.select.option>
27 <f:form.select.option value="2">Option two</f:form.select.option>
28 <f:form.select.optgroup>
29 <f:form.select.option value="3">Grouped option one</f:form.select.option>
30 <f:form.select.option value="4">Grouped option twi</f:form.select.option>
31 </f:form.select.optgroup>
32 </f:form.select>
33
34
35 Impact
36 ======
37
38 * Adds two new ViewHelpers
39 * Changes SelectViewHelper to allow tag content (but not manual options created without using f:form.select.*)
40
41 .. index:: Fluid