I am looking for a city collector, like the one that uses facebook on the create-event page. The user should be able to type the name of the city, and he will be displayed with the state / province that they can choose.
I think this is the easiest way to allow users to choose a city? Either this, or we need cut-out boxes, which first allow you to choose a country, then a province, then cities can be loaded ... but I think it will be too slow.
This will be used internally for our employees to quickly enter information received by telephone. The city must be valid, recognized by our database. I do not know if I should force the input field into a very specific recognized format, for example <city-name><comma><single-space><two-letter-province-code>, which is then analyzed and viewed in the database, or the user can select something when a pop-up window appears with the names of cities, and then after they choose one hidden field, it will be filled with the city identifier. Which would give me the least headache?
I think that the city picker goes a little beyond a typical widget with autocomplete, because what is displayed in the drop-down list is not quite the same as what is copied to the text box. For example, a country may be displayed in the drop-down list, but in fact there is no need to display this in the field. Is there a widget that supports this too?
source
share