How does one control select lists using form API ?
- by user363036
I know this is somewhat of a newb question but I am running into a deadline and 3 days of Drupal experience will just not cut it...
$form['gender'] = array('#type' = 'select', '#title' = t('Gender: *'), '#options' = array(t('Male'), t('Female')), '#required' = TRUE, '#weight' = 2, );
How do I assign values to select values ? For example Male - 'm' and Female- 'f'. Also how do I give the select box a default caption "please select gender..."
Thanks guys