1 email.module | email_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $base) |
Implements hook_field_widget_form().
File
- core/
modules/ email/ email.module, line 133 - Module file for the email module, which creates an email address field.
Code
function email_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $base) {
$element = $base;
$element['email'] = $base + array(
'#type' => 'email',
'#default_value' => isset($items[$delta]['email']) ? $items[$delta]['email'] : NULL,
'#size' => $instance['widget']['settings']['size'],
);
return $element;
}