I created a form. All fields are textfield.
I have am autocomplete field.
I want to fill automatically the other fields based on the autocomplete field selection.

thank you

Comments

anil614sagar’s picture

Hi,

You can do this using Javascript / Ajax / Jquery. Write a small JS file to do this. Check out drupal http://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_a...

OR

You can use form API states property too to change the fields values on change of other fields. Check out Drupal 7 form API.

http://api.drupal.org/api/drupal/developer!topics!forms_api_reference.ht...

Hope it helps.

Cheers,
Anil Sagar,
Lead Drupal Developer,
Azri Soulutions,
http://azrisolutions.com/

sanduciprian’s picture

i managed with ajax callback

thanks