finder_autocomplete_finder_element

  1. finder
    1. 6.x-1.x
    2. 7.x-1.x
Versions
6.x-1.x – 7.x-1.x finder_autocomplete_finder_element($element, &$form_element)

Implements hook_finder_element().

See also

hook_finder_element()

Code

modules/finder_autocomplete/finder_autocomplete.module, line 136

<?php
function finder_autocomplete_finder_element($element, &$form_element) {
  if ($element->element == 'autocomplete') {
    $form_element['#type'] = 'textfield';

    $autocomplete_path = 'finder_autocomplete/autocomplete/' . $element->finder_id . '/' . $element->finder_element_id;

    if ($element->settings['form']['autosubmit']) {
      $form_element['#theme'] = 'finder_autocomplete_textfield';
    }

    $form_element['#autocomplete_path'] = $autocomplete_path;

    $properties = array(
      'field_prefix',
      'field_suffix',
      'maxlength',
      'size',
    );
    foreach ($properties as $property) {
      if ($element->settings['form'][$property]) {
        $form_element['#' . $property] = $element->settings['form'][$property];
      }
    }
  }
}
?>

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.