How to create Autocomplete Address Form using Google API

Prem Tiwari - - Freebies, Google

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


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.

Prem Tiwari

Prem Tiwari is the founder of and also a professional developer and a blogger by hobby.

Tags: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.