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