finder_autocomplete_finder_element

Versions
6--1
finder_autocomplete_finder_element($element, &$form_element)

Implementation of hook_finder_element().

See also

hook_finder_element()

Code

modules/finder_autocomplete/finder_autocomplete.module, line 129

<?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

Mollom CAPTCHA (play audio CAPTCHA)
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.