I need a field in a web form in rails named “country” that will autocomplete the user’s answer based on a list of countries. E.g the User enters “Ameri” and the text box autocompletes the “ca”. I need a list of countries and a way of autocompleting the form. Thanks.
Also I would like to have a field below that named “state” to provide only the states for the country specified so if the user chooses america the state list will have all the american states but if the user chooses another country it will provide the list of states for that country.
So where can I find a list of countries states and maybe even cities?
How can I do autocomplete in rails?
How can I have a field below the first one that autocompletes only the states for that country?
Thanks
Check out:
Autocomplete:
http://jqueryui.com/demos/autocomplete/
Lists of geographic places including countries and states: http://autonomousmachine.com/posts/2009/4/1/carmen-a-rails-plugin-for-geographic-names-and-abbreviations