Create a simple comboselect element
function example_elements_form() {
$form = array();
$options = array(
'one' => t('First Option'),
'two' => t('Second Option'),
);
$form['choice'] = array(
'#type' => 'comboselect',
'#title' => t('Example'),
'#default_options' => $options,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
return $form;
}
$form = array();
$options = array(
'one' => t('First Option'),
'two' => t('Second Option'),
);
$form['choice'] = array(
'#type' => 'comboselect',
'#title' => t('Example'),
'#default_options' => $options,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
return $form;
}