简体   繁体   中英

Drupal 7 - Node reference not autocomplete

I would like to have a node reference field as a text field with NO autocomplete. How can I get it?

Thanks

You can use hook_form_alter () to alter this form, and then unset the #autocomplete_path property from your text field.

Example:

unset($form['myfield']['#autocomplete_path']);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM