function _webform_defaults_name in Name Field 7
Implements Webform callback _webform_defaults_COMPONENT().
File
- includes/
webform.components.inc, line 11 - Name Field module name component for the Webform module.
Code
function _webform_defaults_name() {
$elements = name_element_info();
$element = $elements['name_element'];
$component = array(
'name' => '',
'form_key' => NULL,
'pid' => 0,
'weight' => 0,
'value' => $element['#default_value'],
'required' => 0,
'extra' => array(
'display_format' => 'default',
'csv_format' => 'default',
'table_format' => 'default',
'enabled_components' => $element['#minimum_components'],
'minimum_components' => $element['#minimum_components'],
'components' => $element['#components'],
'description' => '',
'use_real_name' => 0,
'private' => 0,
),
);
foreach (_name_translations() as $key => $label) {
$component['extra']['components'][$key]['default_value'] = '';
}
return $component;
}