[TYPO3-english] optgroups in select field from itemsProcFunc?
typo3ml at wehe-online.de
typo3ml at wehe-online.de
Tue May 25 13:39:25 CEST 2010
Hi all,
I use itemsProcFunc to fill a select with custom items.
I do it like this:
custom method:
---------------------------------------------
$allBoxes = array();
$boxes = array();
$boxsets = array();
// do some database stuff to fill the arrays
// merge the different arrays to one array
$allBoxes = array_merge($allBoxes, $boxsets);
$allBoxes = array_merge($allBoxes, $boxes);
array_unshift($allBoxes, array('', 0));
// fill the list
$params['items'] = $allBoxes;
---------------------------------------------
Works fine, but it is possible to group the different
data in optgroups? How can I do that?
More information about the TYPO3-english
mailing list