How to create a multi select list in a custom module, populate values from taxonomy term and access the selected values when the form is submitted.
I have to code below for multi select list. I want to know how to access the multiple selected values from multi select list when the form is submitted.
function rice_graph_form($form, &$form_state) {
$form['country'] = array(
'#title' => t('Country'),
'#type' => 'select',
'#multiple' => true,
//'#description' => 'Select a Country.',
'#options' => rice_graph_get_terms('country')
);
if(isset($form_state['values'])) {
$multivalues = $form_state['values']['country'];
}
}