function theme_webform_time in Webform 6.3
Same name and namespace in other branches
- 5.2 components/time.inc \theme_webform_time()
- 5 components/time.inc \theme_webform_time()
- 6.2 components/time.inc \theme_webform_time()
- 7.4 components/time.inc \theme_webform_time()
- 7.3 components/time.inc \theme_webform_time()
Theme a webform time element.
1 theme call to theme_webform_time()
- _webform_render_time in components/
time.inc - Implements _webform_render_component().
File
- components/
time.inc, line 241 - Webform module time component.
Code
function theme_webform_time($element) {
$element['hour']['#attributes']['class'] = 'hour';
$element['minute']['#attributes']['class'] = 'minute';
// Add error classes to all items within the element.
if (form_get_error($element)) {
$element['hour']['#attributes']['class'] .= 'error';
$element['minute']['#attributes']['class'] .= 'error';
}
$output = '<div class="webform-container-inline">' . drupal_render($element['hour']) . drupal_render($element['minute']) . drupal_render($element['ampm']) . '</div>';
$element['#type'] = 'element';
return theme('form_element', $element, $output);
}