You are here

function theme_clientside_validation_checkboxes in Clientside Validation 6

Theme callback

See also

clientside_validation_theme()

1 string reference to 'theme_clientside_validation_checkboxes'
clientside_validation_theme_registry_alter in ./clientside_validation.module
Implements hook_theme_registry_alter().

File

./clientside_validation.module, line 1085
Add client side validation to a webform.

Code

function theme_clientside_validation_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']) {
    return theme('form_element', $element, $element['#children']);
  }
  else {
    return $element['#children'];
  }
}