Project:Addresses
Version:6.x-1.10
Component:Countries (codes, names, etc.)
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Hello. I'm a bit new to Drupal. Sorry, may be I've misunderstood something. But I was wondering is there any possibility to make city field as drop-down list (e.g. Select Field) with already existing set of values related to the country or state/province value?
Or may be this is in development stage if your module doesn't provide this feature now?

Comments

#1

nostop8,

This would require a service that provides the list of cities for a country which for a large countries like the US, Canada, Russia, China would be quite a list. We do not have that in this module.

Thank you.
Alexis

#2

Thanks for your quick answer!
May be you know some module that can provide this feature?
I've created my own module that works with Geonames Module to get countries and related cities. But Geonames Free Service is very often down. So, the only way to make my application work reliable and stable is to get Premium Account of Geonames Service.
If you know anything about my problem and could suggest me some module or service I would be very grateful!

#3

I'm not personally aware of any alternative. However, you could write code to cache all the data that you ever get from Geonames so that way whether they are down will matter less and less as you move forward.

#4

Hey! The cache was actually turned on there. But when I turned it off everything started to work perfectly :D
I haven't watch the code of Geonames Module and how does it cache data. I guess it works not very clever if it stores an empty data. But this is a different story :)

Anyway, a big thanks for the tip! Good luck!