[TYPO3-project-formidable] renderlet:LISTBOX - Multiple Values Selected

Benjamin Fischer mailbox at typedown.com
Tue May 6 11:51:16 CEST 2008


Hello formidable List,

I have a little problem using a renderlet:LISTBOX with multiple values
selected in in edit mode, maybe it is easy to fix, for the moment I
could not find a solution:

In an application for the management of fe_users the usergroups are
displayed in a renderlet:LISTBOX. To be able to select more than one
the listbox uses <custom>size="4"</custom>. The display of all
usergroups works well and in creation mode these groups can be
selected and saved in the database. In edit mode the groups of the
current user are not selected - saving the form leads to an empty
usergroup field. If I use a renderlet:CHECKBOX with the same
<data><userobj> this seems to be no problem and the current values are
already checked when loading the user in edit mode.

Code snippet for the listbox:

<renderlet:LISTBOX name="usergroup" label="Usergroup:">
	<data>
		<userobj>
			<php><![CDATA[
				return $GLOBALS["TYPO3_DB"]->exec_SELECTgetRows(
					"uid as value, title as caption",
					"fe_groups",
					"pid = 30",
					"",
					"caption ASC"
				);
			]]></php>
		</userobj>
	</data>
	<custom>size="4"</custom>
</renderlet:LISTBOX>

Is there a way to fill the defaultvalues in edit mode?

Best regards, Benjamin


More information about the TYPO3-project-formidable mailing list