function tzfield_autocomplete_process in Time Zone Field 6
Process an individual autocomplete element.
1 string reference to 'tzfield_autocomplete_process'
- tzfield_elements in ./
tzfield.module - Implementation of FAPI hook_elements().
File
- ./
tzfield.module, line 287 - Defines a field type for storing timezones.
Code
function tzfield_autocomplete_process($element, $edit, &$form_state, $form) {
// Add a validation step where the value can be unwrapped.
$field_key = $element['#columns'][0];
$element[$field_key] = array(
'#type' => 'text_textfield',
'#default_value' => isset($element['#value']) ? $element['#value'] : '',
'#autocomplete_path' => 'tzfield/autocomplete/' . $element['#field_name'],
'#element_validate' => array(
'tzfield_autocomplete_validate',
),
// The following values were set by the content module and need
// to be passed down to the nested element.
'#field_name' => $element['#field_name'],
'#type_name' => $element['#type_name'],
'#delta' => $element['#delta'],
'#columns' => $element['#columns'],
'#title' => $element['#title'],
'#description' => $element['#description'],
);
return $element;
}