function theme_date in Drupal 7
Same name and namespace in other branches
- 4 includes/form.inc \theme_date()
- 5 includes/form.inc \theme_date()
- 6 includes/form.inc \theme_date()
Returns HTML for a date selection form element.
Parameters
$variables: An associative array containing:
- element: An associative array containing the properties of the element. Properties used: #title, #value, #options, #description, #required, #attributes.
Related topics
1 theme call to theme_date()
- system_element_info in modules/
system/ system.module - Implements hook_element_info().
File
- includes/
form.inc, line 3073 - Functions for form and batch generation and processing.
Code
function theme_date($variables) {
$element = $variables['element'];
$attributes = array();
if (isset($element['#id'])) {
$attributes['id'] = $element['#id'];
}
if (!empty($element['#attributes']['class'])) {
$attributes['class'] = (array) $element['#attributes']['class'];
}
$attributes['class'][] = 'container-inline';
return '<div' . drupal_attributes($attributes) . '>' . drupal_render_children($element) . '</div>';
}