I, too, would like to know how to do this.
Hey Frank
after lots of searching online, i have found and added an extra piece of code to backend file.
On file manager (cpanel) go to plugin folder
public_html/wp-content/plugins/autocomplete-location-field-contact-form-7/includes
open or edit php file GWAA_Backend.php
add extra code after autocomplete.inputId = acInputs[i].id;
extra code:
// Set initial restriction to the greater list of countries.
// [START maps_places_autocomplete_countries_multiple]
autocomplete.setComponentRestrictions({country: [“au”],});
you can select your country based on google country codes.
it worked for my site.
Thank you very much! Would this work for restricting states too?
I actually looked and I don’t see that line of code in the file. Weird!
So, I actually found it. But this doesn’t seem to be working. Am I missing something?
var autocomplete = new google.maps.places.Autocomplete(acInputs[i]);
autocomplete.inputId = acInputs[i].id;
// Set initial restriction to the greater list of countries.
// [START maps_places_autocomplete_countries_multiple]
autocomplete.setComponentRestrictions({country: [“us”],});
google.maps.event.addListener(autocomplete, 'place_changed', function () {
});
}
@smartstartaus3081 does that look correct?