theme_checkboxes($element)
drupal/includes/form.inc, line 1996
Format a set of checkboxes.
$element An associative array containing the properties of the element.
A themed HTML string representing the checkbox set.
| Name | Description |
|---|---|
| Default theme implementations | Functions and templates that present output to the user, and can be implemented by themes. |
| Form generation | Functions to enable the processing and display of HTML forms. |
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'];
}
}