Dynamic Autocomplete Path

Component ID

2267377

Component name

Dynamic Autocomplete Path

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

461

Component created

Component changed

Component body

This module allows developers to define special values for the #autocomplete_path form API property making possible to use non static URIs.

Example:

If you define this textfield:

  $form['items'] = array(
    '#title' => t('Items'),
    '#type' => 'textfield',
    '#autocomplete_path' => '/custom_search_callback/#language/#type/',
  );

The #language and #type tokens will be replaced by the values of the elements with id="language" and id="type" defined in the DOM of the current page.

You will have to provide your own custom callback, this module only simplifies the proccess to make the uri replacements.