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

Martin Ernst ernst at alto.de
Wed Jan 11 13:23:25 CET 2012


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