I have a view with a filter "Has taxonomy term", this filter is an exposed filter and is set to be a "Dropdown" and "Show Hierarchy"
The vocabulary has parents and children term (hierarchical).
The filter works fine but the html tags of the select dropdown are incorrect. The parent terms should be wrapped in instead of (see image 2)
Can I override this?
I trying to do it with hook_form_alter() but I see that the construction of the select itself is done by drupal_map_assoc() function. Then I see no way to do it? Can I put the value for '#options' in other way?
<?php
$form['undergraduate']['school_country'] = array(
'#type' => 'select',
'#options' => drupal_map_assoc(array(t('UK'), t('Other'))),
'#title' => t('In what country is your college or university located?'),
);
?>