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

Jerome Schneider typo3dev at ameos.com
Tue May 6 11:57:42 CEST 2008


Hi Benjamin,

The param you're looking for is multiple="true" on the renderlet

<renderlet:LISTBOX multiple="true" ...>


This way the LISTBOX will be said to work with possible comma-separated 
values. Default is multiple="false" for listbox, and always true for 
checkbox, of course.


Best regards,
Jerome Schneider

Benjamin Fischer a écrit :
> 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


-- 


*Jérôme Schneider*
/Developer/
/Formidable - Rapid Application Developpement Framework for Typo3
<http://formidable.typo3.ug>/
/Ameos <http://www.ameos.com>/


More information about the TYPO3-project-formidable mailing list