function _webform_display_name in Name Field 7
Implements Webform callback _webform_display_COMPONENT().
File
- includes/
webform.components.inc, line 281 - Name Field module name component for the Webform module.
Code
function _webform_display_name($name, $value, $format = 'html') {
$themed_name = theme('name_item', array(
'item' => $value,
'format' => $name['extra']['display_format'],
));
return array(
'#title' => $name['name'],
'#weight' => $name['weight'],
'#theme' => 'webform_display_textfield',
'#theme_wrappers' => $format == 'html' ? array(
'webform_element',
) : array(
'webform_element_text',
),
'#post_render' => array(
'webform_element_wrapper',
),
'#component' => $name,
'#format' => $format,
'#value' => $themed_name,
'#field_prefix' => '',
'#field_suffix' => '',
);
}