[TYPO3-mvc] Fluid: form.select view helper and empty default item
Susanne Moog
typo3 at susanne-moog.de
Mon Feb 1 12:45:03 CET 2010
Hey everyone,
I have a short question about the form.select view helper of fluid. How
do you handle select boxes that should start with an empty item
(optional attribute).
I want to render something like
<select name="category" size="1" id="category"><option value="">---</option>
<option value="cat1">cat1</option>
<option value="cat2">cat2</option>
<option value="cat3">cat3</option>
</select>
I'm using the following code atm (with the categories as object) and am
unsure how to get an empty object at the beginning:
<f:form.select property="category" options="{categories}"
optionLabelField="name" size="1" id="category" />
Thanks for any help,
Susanne
More information about the TYPO3-project-typo3v4mvc
mailing list