function theme_hierarchical_select_select in Hierarchical Select 6.3
Same name and namespace in other branches
- 5.3 hierarchical_select.module \theme_hierarchical_select_select()
- 7.3 includes/theme.inc \theme_hierarchical_select_select()
Format a select in the .hierarchial-select div: prevent it from being wrapped in a div. This simplifies the CSS and JS code.
Parameters
$element: An associative array containing the properties of the element.
Return value
A themed HTML string representing the form element.
2 theme calls to theme_hierarchical_select_select()
- _hierarchical_select_process_render_flat_select in ./
hierarchical_select.module - Render a flat select version of a hierarchical_select form element. This is necessary for backwards compatibility (together with some Javascript code) in case of GET forms.
- _hierarchical_select_process_render_hs_selects in ./
hierarchical_select.module - Render the selects in the hierarchical select.
File
- includes/
theme.inc, line 126 - All theme functions for the Hierarchical Select module.
Code
function theme_hierarchical_select_select($element) {
$select = '';
$size = $element['#size'] ? ' size="' . $element['#size'] . '"' : '';
$class = array(
'form-select',
);
if (form_get_error($element) === '') {
$class = array_merge($class, array(
'error',
));
}
_form_set_class($element, $class);
$multiple = isset($element['#multiple']) && $element['#multiple'];
return '<select name="' . $element['#name'] . '' . ($multiple ? '[]' : '') . '"' . ($multiple ? ' multiple="multiple" ' : '') . drupal_attributes($element['#attributes']) . ' id="' . $element['#id'] . '" ' . $size . '>' . _hierarchical_select_options($element) . '</select>';
}