[TYPO3-mvc] FLUID: check checkbox by array

Franz Koch typo3.RemoveForMessage at elements-net.de
Fri Nov 26 01:53:22 CET 2010


Hey,

> I trying to check a group of checkboxes in Fluid-template specified by
> an two dimensional array myarr[x][y].
>
> The x and y are the uids of two Objects "Cols" and "Rows".
>
> In ExtbaseCheatSheet I found {name.number} for an array but
> {myarr.row.uid.col.uid} doesn't work and thats OK.

what exactly do you try to do? Do you try to set the "checked" attribute 
or do you have issues with building the correct "name" attribute?

Eitherway - this should work:

<f:for each="{mayarr}" as="row" iteration="rowIterator">
	<f:for each="{row}" as="col">
		<f:form.checkbox 
name="nameOfObject[nameOfProperty][{rowIterator.index}][{col.uid}]" 
checked="{col.checked}" value="TRUE" />
	</f:for>
</f:for>



-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list