Use the below snippet to have an Auto-Complete Address input powered by google.
This snippet will fill out the Address Field with the full address, for a script to fill out City, State and Postal/Zip Code separately, use this script:
Address Auto Complete for Order Forms
NOTE*:
You will need a Google Places API key.
Please Make Sure to Enable the Google Maps API as well as the Google Places API
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places"></script> <script> var input = document.querySelector('input[name="address"]'); var options = { types: ['address'] }; autocomplete = new google.maps.places.Autocomplete(input, options); autocomplete.setFields(['address_component']); autocomplete.addListener('place_changed', fillInAddress); function fillInAddress() { var address = document.querySelector('input[name="address"]') var e = document.createEvent('HTMLEvents'); e.initEvent('input', true, true); address.dispatchEvent(e); setTimeout(function () { document.querySelector(".pac-container").style.display = "none" },1000) } </script>