You are here

function finder_autocomplete_element in Finder 7.2

Element callback.

1 string reference to 'finder_autocomplete_element'
autocomplete.inc in plugins/element_handler/autocomplete.inc
The finder autocomplete element handler plugin.

File

plugins/element_handler/autocomplete.inc, line 318
The finder autocomplete element handler plugin.

Code

function finder_autocomplete_element($element, &$form_element, $form_state) {
  $finder = $element->finder;
  $form_element['#type'] = 'textfield';
  $form_element['#theme'] = 'finder_autocomplete_textfield';
  $autocomplete_path = 'finder_autocomplete/autocomplete/' . $finder->name . '/' . $element->id;
  $form_element['#autocomplete_path'] = $autocomplete_path;
  $properties = array(
    'maxlength',
    'size',
    'autosubmit',
  );
  foreach ($properties as $property) {
    $form_element['#' . $property] = $finder
      ->esetting($element, $property);
  }
}