Forum Academy Marketplace Showcase Pricing Features

Google Maps Autocomplete > State, City, Zip fields

I have successfully implemented a google autocomplete using both the search function and zeroqode’s google maps plugin.

The issue I am having is that I want the address data to be split into the different fields when the address is correctly identified because I need all the states in the state field, cities in the city field, postcodes (zip) in the same field.

Even if it requires sending the parameters to the google places API, I have no idea how to deal with the json coming back and how I could make it both autocomplete in the search address input field and also split out the state, city, postcode etc at the same time.

Any assistance appreciated!

Actually I’ve worked it out, now I need to know how to restrict the results to just Australia as they type the address?

Can you share how you worked this out? I’m running into the same issue.

@morgan

Are you able to give me a hand with this? Trying to do something similar with address in Canada and US, but can’ seem it figure it out. Also, looked into the Zeroqode google maps plugin, and don’t know which one to use