[TYPO3-mvc] checkbox issues

Thomas Mammitzsch thomas at visualworx.de
Thu Sep 30 16:01:08 CEST 2010


hi list,

i have a problem getting checkboxes checked when a form is redisplayed 
(f.e. on validation errors). Here is what i do currently:

template:

<f:for each="{categories}" as="category">
	<div class="checkbox">
		<f:form.checkbox name="frontendUser[ptferegisterCategories][]" 
value="{category.uid}"/>
	<label for="txMysqlmssqlsyncCategorie">{category.title}</label>
	</div>
</f:for>


categories is an array of category objects. For each category object i 
render a checkbox.
The selected categories go into a property ptferegisterCategories 
(ObjectStorage) of the frontendUser object.
How can i set the relevant checkboxes checked depending on the 
categories that are stored in ptferegisterCategories property of the 
frontend user? AFAIK there are only simple comparisons possible.

regards, Thomas


More information about the TYPO3-project-typo3v4mvc mailing list