[BUGFIX] EXT:form - Selected attribute not rendered
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / Resources / Private / Partials / Default / Show / FlatElements / Select.html
1 {namespace form=TYPO3\CMS\Form\ViewHelpers}
2
3 <f:if condition="{model.showElement}">
4 <li class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
5 <label for="{model.additionalArguments.id}">
6 {model.additionalArguments.label}
7 <f:if condition="{model.mandatoryValidationMessages}">
8 <em><f:for each="{model.mandatoryValidationMessages}" as="mandatoryValidationMessage" iteration="iterator">{mandatoryValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></em>
9 </f:if>
10 <f:if condition="{model.validationErrorMessages}">
11 <strong><f:for each="{model.validationErrorMessages}" as="errorValidationMessage" iteration="iterator">{errorValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></strong>
12 </f:if>
13 </label>
14
15 <form:select
16 class="{model.additionalArguments.class}"
17 dir="{model.additionalArguments.dir}"
18 id="{model.additionalArguments.id}"
19 lang="{model.additionalArguments.lang}"
20 style="{model.additionalArguments.style}"
21 title="{model.additionalArguments.title}"
22 accesskey="{model.additionalArguments.accesskey}"
23 tabindex="{model.additionalArguments.tabindex}"
24 onclick="{model.additionalArguments.onclick}"
25
26 name="{model.additionalArguments.prefix}[{model.additionalArguments.name}]"
27 value="{form:aggregateSelectOptions(model:model, returnSelectedValues: 1)}"
28
29 multiple="{model.additionalArguments.multiple}"
30 size="{model.additionalArguments.size}"
31
32 optionLabelField="label"
33 optionValueField="value"
34 options="{form:aggregateSelectOptions(model:model)}"
35 prependOptionLabel="{model.additionalArguments.prependOptionLabel}"
36 prependOptionValue="{model.additionalArguments.prependOptionValue}"
37 selectAllByDefault="{model.additionalArguments.selectAllByDefault}"
38 sortByOptionLabel="{model.additionalArguments.sortByOptionLabel}"
39
40 errorClass="{model.additionalArguments.errorClass}"
41 additionalAttributes="{model.htmlAttributes}"
42 />
43 </li>
44 </f:if>