By Yuriy on
Hi All !
How to create a AJAX custom depend fields 'Country' ->'City' in User Profile
like to
http://ajax.zervaas.com.au/examples/CountryRegionCityJax/
Thanks!!
Yuriy
Hi All !
How to create a AJAX custom depend fields 'Country' ->'City' in User Profile
like to
http://ajax.zervaas.com.au/examples/CountryRegionCityJax/
Thanks!!
Yuriy
Comments
I had the same question about a week ago...
First you need your data, you need your countries and you need your cities. The question is what are you going to use, taxonomy module, category module or something else? I originally tried the taxonomy module but it wasn't powerful enough for my needs so I'm using category now (http://drupal.org/project/category).
If you are using taxonomy, you can then use the CCK (http://drupal.org/project/cck), content taxonomy module (http://drupal.org/project/content_taxonomy) plus the activeselect module (http://drupal.org/project/activeselect). I needed to put in patches for content taxonomy to work properly for Drupal 5.1.
If you are using categories + activeselect and you are using Drupal 5.1, there's a very small patch to put in to have the 'parent' activeselect box work unless it's fixed by now. With the category module, you create your containers and categories (http://category.greenash.net.au/docs for tutorials), assign your containers to your content-type and presto, the category module auto-magically creates the exact dynamic select boxes that are in your example! Of course you need to make sure your parent relationships are correct.
The trick is experimentation, you just need to install the modules, read the docs on the modules (and the comments and forum discussions), put in sample data, click on stuff and then you'll figure out the best method to use.
Hmm, I should figure out how to do screen-casts, I could make some tutorials for this kinda thing...
azbok
Doah... you asked with respect to the user profile!
Sorry about that, I didn't fully read your question about the user profile part. I have a feeling one would still need activeselect though :)
heres a neat implementation
heres a neat implementation using jQuery http://www.ubercart.org/jquery_dynamic_form/18
a screencast on working with active select, would be welcome!