function _webform_display_date in Webform 7.3
Same name and namespace in other branches
- 6.3 components/date.inc \_webform_display_date()
- 7.4 components/date.inc \_webform_display_date()
Implements _webform_display_component().
File
- components/
date.inc, line 343 - Webform module date component.
Code
function _webform_display_date($component, $value, $format = 'html') {
$value = webform_date_array(isset($value[0]) ? $value[0] : '', 'date');
return array(
'#title' => $component['name'],
'#weight' => $component['weight'],
'#theme' => 'webform_display_date',
'#theme_wrappers' => $format == 'html' ? array(
'webform_element',
) : array(
'webform_element_text',
),
'#format' => $format,
'#value' => $value,
'#translatable' => array(
'title',
),
);
}