[TYPO3-mvc] select view helper inside for each
Dmitry Vasiliev
dmitry at typo3.ru.net
Tue Apr 15 12:20:51 CEST 2014
Hi Everybody,
In my extension I get a list of subcategories so
<f:for each="{category.subcategory}" as="subcategory">
<f:form.select property="subcategory" options="{subcategory}"
optionLabelField="title" multiple="0" size="10" />
</f:for>
As a result I have many tags "select"
<select multiple="0" size="10" name="">
<option value="5">Title 1</option>
</select><br />
<select multiple="0" size="10" name="">
<option value="10">Title 2</option>
<option value="11" selected="selected">Title 3</option>
</select>
If I do this, I can't get the field option = selected.
<select>
<f:for each="{category.subcategory}" as="subcategory">
<option value="{subcategory.uid}">{subcategory.title}</option>
</f:for>
</select>
Help, how can I solve this problem.
Regards, D.Vasiliev.
--
Regards, Dmitry Vasiliev
+7 950 001 85 15
dmitry at typo3.ru.net
http://typo3.ru.net/
More information about the TYPO3-project-typo3v4mvc
mailing list