Google Places Autocomplete Force Selection

Actually, what we did was the following:
– Every time a location is picked from the Auto complete list, we populate some hidden fields with some fields coming from the JSON response (city name, country name, longitude and latitude)
– When the form is submitted, we check if these fields have values, if they don’t, it means that the user instead of selecting a location from the list, he just entered a value himself.

It is not solving the problem in a JS way, but still, it does the trick just fine!

Leave a Comment