I am trying to make use of the following code from the docs:
DSP->body .= $DSP->div('itemWrapper')
.$DSP->qdiv('itemTitle', $LANG->line('category_option'))
.$DSP->input_select_header('category[]', 'y',8)
.$DSP->input_select_option('all', $LANG->line('none'))
.$DSP->input_select_option('none', $LANG->line('none'))
.$possible_categories
.$DSP->input_select_footer();
Regarding “.$possible_categories” – how would this variable (array?) have to be set up to work?
Thanks.
$possible_categories is just an example string (note the . to concatenate the whole thing). In regular usage you would simply add more input_select_options, so you could build it up like this:
$cats = array('a' => 'b', 'c' => 'd');
$possible_categories = '';
foreach($cats as $key => $val)
{
$possible_categories .= $DSP->input_select_option($key, $val);
}
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.