How to create Autocomplete Address Form using Google API

Does your application include an address form, such as the Billing and Shipping address for your online store, a credit card billing address, or a taxi booking form? Autocomplete can help users supply the details.

This feature i based on Places library in the Google Maps JavaScript API. You can use autocomplete to give your applications the type-ahead-search behavior of the Google Maps search field. When a user starts typing an address, autocomplete will fill in the rest.

Google Map API

Download      Demo

Add this script

HTML Code

Set the bounds on creation of the Autocomplete object

Get place information from Autocomplete

By default, autocomplete will give you the full address as a single line of text. For an address form, it is useful to get the address in structured format.
Below code will autocomplete fill your address form.

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:


Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.

Article Tags: , ,