Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I am using the "Taxonomize Location" module to automatically save all Location CCK Field submissions into the "location" taxonomy. Terms in the location taxonomy are saved in 3 layers: Country -> Province -> City.

The location CCK field offers Country and Province as select lists, and City merely as a text field. Is it possible to display the City field as an autocomplete field that pulls city suggestions from the third layer of my location taxonomy, depending on what Country and Province was selected?

share|improve this question
    
cck is no longer a module in d7 it is part of core. –  Mike Sep 30 '12 at 21:13
add comment

1 Answer 1

What you can do is use hook_form_alter. You will define an #autocomplete_path and use hook_menu to create a menu item for this path. In hook_menu, you will define a page callback. This will be a function that will return the list of cities from your taxonomy items.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.