Autocomplete without using callback

I want to use autocomplete fields that reference an external source for their autocomplete data. Drupal seems to discard all autocomplete_paths that are not available in Drupal. Any ideas how to get around this? The form field is as follows:

$form['business_city'] = array(
    '#type' => 'textfield',
    '#size' => 30,
    '#title' => t('city'),
    '#autocomplete_path' => '_/city?=',
    '#default_value' => $userProfile->field_address_business_city[0]['value'],
);

_ / city is not available in Drupal for performance reasons. The script loads Drupal to the session level to verify a valid login.

UPDATE:

If I create an autocomplete field by adding the necessary markup manually to the field, this works, but it is inconvenient to maintain:

'#attributes' => array('class' => 'form-autocomplete'),
'#suffix' => '<input type="hidden" disabled="disabled" value="/_/city?n=" id="edit-private-city-autocomplete" class="autocomplete">',
+3
source share
2 answers

Drupal 6 theme_textfield(), ().

, , .

+2

, , "/_/city? n =", menu_hook. , drupal_valid_path() theme_textfield(). .

+3

All Articles