You are here

function tzfield_field_widget_form in Time Zone Field 7

Implements hook_field_widget_form().

File

./tzfield.module, line 119
Defines a time zone field type.

Code

function tzfield_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
  $element += array(
    '#type' => 'textfield',
    '#default_value' => isset($items[$delta]['value']) ? $items[$delta]['value'] : NULL,
    '#size' => $instance['widget']['settings']['size'],
    '#autocomplete_path' => 'tzfield/autocomplete/' . $field['field_name'],
  );
  return array(
    'value' => $element,
  );
}