15
I recommend using something like this:
case "select":
$no_multi = array('field_name1', 'field_name2');
if (in_array($fields[$i]->getVar('field_name'), $no_multi)) {
$options = $fields[$i]->getVar('field_options');
$element = new XoopsFormSelect($fields[$i]->getVar('field_title'), $fields[$i]->getVar('field_name'));
asort($options);
$element->addOptionArray($options);
$searchform->addElement($element);
unset($element);
break;
}
$options = $fields[$i]->getVar('field_options');
$size = MIN( count($options), 10 );
$element = new XoopsFormSelect($fields[$i]->getVar('field_title'), $fields[$i]->getVar('field_name'), null, $size, true);
asort($options);
$element->addOptionArray($options);
$searchform->addElement($element);
unset($element);
break;
Change $no_multi has desired.