[TASK] EXT:form - add empty option to select elements
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / Resources / Private / Frontend / Partials / SingleSelect.html
1 <html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:formvh="http://typo3.org/ns/TYPO3/CMS/Form/ViewHelpers" data-namespace-typo3-fluid="true">
2 <formvh:renderRenderable renderable="{element}">
3 <f:render partial="Field/Field" arguments="{element: element}" contentAs="elementContent">
4 <f:if condition="{element.properties.prependOptionLabel}">
5 <f:then>
6 <f:form.select
7 property="{element.identifier}"
8 id="{element.uniqueIdentifier}"
9 options="{formvh:translateElementProperty(element: element, property: 'options')}"
10 class="{element.properties.elementClassAttribute} form-control"
11 errorClass="{element.properties.elementErrorClassAttribute}"
12 additionalAttributes="{formvh:translateElementProperty(element: element, property: 'fluidAdditionalAttributes')}"
13 prependOptionLabel="{formvh:translateElementProperty(element: element, property: 'prependOptionLabel')}"
14 prependOptionValue="{formvh:translateElementProperty(element: element, property: 'prependOptionValue')}"
15 />
16 </f:then>
17 <f:else>
18 <f:form.select
19 property="{element.identifier}"
20 id="{element.uniqueIdentifier}"
21 options="{formvh:translateElementProperty(element: element, property: 'options')}"
22 class="{element.properties.elementClassAttribute} form-control"
23 errorClass="{element.properties.elementErrorClassAttribute}"
24 additionalAttributes="{formvh:translateElementProperty(element: element, property: 'fluidAdditionalAttributes')}"
25 />
26 </f:else>
27 </f:if>
28 </f:render>
29 </formvh:renderRenderable>
30 </html>