You are here

function email_widget in Email Field 6

Same name and namespace in other branches
  1. 5 email.module \email_widget()
  2. 6.2 email.module \email_widget()

Implementation of hook_widget().

File

./email.module, line 220

Code

function email_widget(&$form, &$form_state, $field, $items, $delta = 0) {
  $element = array(
    '#type' => $field['widget']['type'],
    '#default_value' => isset($items[$delta]) ? $items[$delta] : '',
  );
  return $element;
}