0

I am implementing a Drupal 7 signup form (through a custom module) where users should be able to indicate their location (Country + Province/State) using dropdown lists. From the description of Location module, this seems possible (by using APIs or someother way). I am new to Drupal and have no idea of how to implement this in the custom module programatically (using location module's APIs). I've googled about this for a couple of days, but couldn't make much progress.

Any sample code or leads would be greatly appreciated.

Thanks a Ton.

user2283993
  • 13
  • 1
  • 6

2 Answers2

0

If location module provides what you what, you should use it. Otherwise try with address field module.

Bhavin Joshi
  • 514
  • 3
  • 12
  • Ok I finally figured out how this is done. We just need to call the api function like here
      $country = array(location_get_provinces("us")); . This returns the provinces of the country which is supplied as a parameter.
    – user2283993 May 02 '13 at 23:26
  • Great! I believe this will do! – Bhavin Joshi May 03 '13 at 03:38
0

Ok I finally figured out how this is done. We just need to call the api function like here $country = array(location_get_provinces("us"));
This returns the provinces of the country which is supplied as a parameter.

user2283993
  • 13
  • 1
  • 6