[TYPO3-mvc] Checkboxes for a collection
Jan Kornblum
jan.kornblum at gmx.de
Mon Sep 16 18:17:13 CEST 2013
Dear newsgroup,
i've got a fluid form where some records are listed. For each records
the user can select an 0 or 1 (like "yes" or "no"):
<f:for each="{documents}" as="document">
<f:form.select options="{0: 0, 1: 1}"
property="documents.{document.uid}"></f:form.select>
</f:for>
The form is based on an own filter model / class, where its property
"documents" is declared as an array. Now instead of using an select
field i would like to use a checkbox for each record.
<f:form.checkbox property="documents.{document.uid}"
value="1"></f:form.checkbox>
But fluid doesn't like this: "Checkbox viewhelpers can only be bound to
properties of type boolean or array. Property "documents[2]" is of type
"NULL"."
So how can i declare a property "documents" in my filter model, which
should be an array (to hold the ids of the documents as a key) but also
should be able to be mapped by an fluid checkbox?
Kind regards, Jan
More information about the TYPO3-project-typo3v4mvc
mailing list