theme_checkboxes

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

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

Code

includes/form.inc, line 1904

<?php
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'];
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.