I am using Geonames API to autocomplete an address field in my form. It is of the format "City,State,Country". Sometimes it takes time for the suggestions to load, so the user enters "City" and moves to next field. Moreover, there are spelling mistakes in the city names. I want to force the user to select a value from autocomplete values. How can this be achieved in PHP and Jquery?