Mat Satler

in Computer World

  • Home
  • About Mat
  • Seo
  • Contact Mat Satler

Address Autocomplete Contact Form 7

April 12, 2017 by Mat Satler 2 Comments

Use Google Maps for Address Autocomplete in Web Form

In order to make address field autocomplete on your website, we need to pull address data from somewhere. A simple and fast way is to use google maps API. Simply place bellow code in the footer.php if you are on the WordPress.

        
        
                

Obtaining Google API Key

Now you will want to go to the Google API Console and create a project to obtain  API key.  Name the project to your liking something like “address autocomplete” and follow along as google makes it really easy to enable and acquire the API key. The Library that you need to enable is “Google Maps JavaScript API”. Once you have the key just place it in the above code and you should be good to go. There could be two additional things that you may need to do in case your autocomplete does not work. We will address these bellow later.

enable API Library - places autocomplete

Adding the Address Field to Contact Form 7

Simply place following code to your contact form 7 and make sure if you change the “your-address” in the primary code that we placed in the footer.php, that you change it accordingly in the form.

[text* your-address id:your-address class:form_input placeholder "Address"]

Possible Issues

If your form will not autocomplete and you completed all the steps above we have come across two very frequent solutions:

  1. Simply enable “Google Places API web Service” – see image above
  2. Add API key restrictions *.yourdomain.com/* – see image bellow

API-key-restrictions1

Filed Under: WordPress Tagged With: Contact Form 7

About Mat Satler

In this fast growing information age that is rapidly evolving in to a social age Mat Satler have been actively involved on the web as a internet/affiliate marketer, SEO, PPC and Social practitioner for more than a decade now. With years of online marketing under his belt he developed over a dozen of tools and applications. Launched nearly 100 websites and promoted well over 100 different products in his own company.
Mat Satler is passionate in helping businesses and professionals embrace and strategically leverage the potential of social media, paid marketing (PPC), search marketing (SEO) and computer consulting.
Today Mat's focus is to services others with his experience and expertise while keeping high level of integrity and dependability.

Featured Post

Address Autocomplete Field Contact Form 7

Address Autocomplete Contact Form 7

iPhone 5 battery replacement program

iPhone 5 Battery Replacement Program

Signed You Out Because Of An Outdated Skype Version

Signed You Out Because Of An Outdated Skype Version

Copyright © 2023 · Created by Mat Satler

Copyright © 2023 · epik on Genesis Framework · WordPress · Log in