[TYPO3-mvc] Bind form.select to a property

Alexander Dick typo3 at dick.at
Sat Jan 14 12:53:43 CET 2012


Hi,

you are missing optionValueField.

<f:form.select
	property="usergroup"
	options="{usergroups}"
	optionValueField="uid"
	optionLabelField="title"
  	multiple="true"
/>

optionValueField is required when creating a multi select.

kind regards
Alex

Am 11.01.2012 13:23, schrieb Martin Ernst:
> Hello,
>
> I want to make managable the front end usergroup of my customers. The
> customer model extends the front end user model of extbase
> Tx_Extabse_Domain_Model_FrontEndUser.
>
> My View has the line
>
> <f:form.select property="usergroup" options="{usergroups}"
> optionLabelField="title" multiple="true"/>
>
> This generates a select box with all my usergroups ({usergroups} being
> filled in the controller). The options look like this:
>
> <option value="5">Administrator</option>
>
> I expect the current usergroups of the customer to be selected when the
> form is loaded. But they are not. No option is selected.
>
> Logging the customer object within the controller shows that the
> customers IS in one usergroup. So I thought this one is automatically
> selected by the view helper.
>
> What is wrong here?


More information about the TYPO3-project-typo3v4mvc mailing list