theme_checkboxes

Versions
5 – 6
theme_checkboxes($element)
7
theme_checkboxes($variables)

Theme a set of checkbox form elements.

Parameters

$variables An associative array containing:

  • element: An associative array containing the properties of the element. Properties used: #children, #attributes.

Return value

A themed HTML string representing the checkbox set.

Related topics

Code

7/includes/form.inc, line 2260

<?php
function theme_checkboxes($variables) {
  $element = $variables['element'];
  $class = 'form-checkboxes';
  if (!empty($element['#attributes']['class'])) {
    $class .= ' ' . implode(' ', $element['#attributes']['class']);
  }
  $element['#children'] = '<div class="' . $class . '">' . (!empty($element['#children']) ? $element['#children'] : '') . '</div>';

  return $element['#children'];
}
?>