function theme_checkboxes in Drupal 6
Same name and namespace in other branches
- 4 includes/form.inc \theme_checkboxes()
- 5 includes/form.inc \theme_checkboxes()
- 7 includes/form.inc \theme_checkboxes()
Format a set of checkboxes.
Parameters
$element: An associative array containing the properties of the element.
Return value
A themed HTML string representing the checkbox set.
Related topics
File
- includes/
form.inc, line 2008
Code
function theme_checkboxes($element) {
$class = 'form-checkboxes';
if (isset($element['#attributes']['class'])) {
$class .= ' ' . $element['#attributes']['class'];
}
$element['#children'] = '<div class="' . $class . '">' . (!empty($element['#children']) ? $element['#children'] : '') . '</div>';
if ($element['#title'] || $element['#description']) {
unset($element['#id']);
return theme('form_element', $element, $element['#children']);
}
else {
return $element['#children'];
}
}