Not sure why, but I was able to get it working by using Field Keys. So for others that may have this issue… I replaced my original code for each radio button in my template file from:
if (get_field('project_prepared')) {
$field = get_field_object('project_prepared');
echo '<li>'.$field['label'].' <span>'.$field['value'].'</span></li>';
}
To:
$field_key = "field_57edca4cb58d1"; // project_prepared
$field = get_field_object($field_key);
if( $field ) { echo '<li>'.$field['label'].' <span>'.$field['value'].'</span></li>'; }
Thanks. That seems to have fixed the callback issue but now I get the error:
ReferenceError: google is not defined
which stops the script at autocomplete = new google.maps.places.Autocomplete(…
Again, only an issue in the back-end.
I’m trying to incorporate auto-complete address fields as setup here:
https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform
I have it working in the front-end, but cannot add the callback to initAutocomplete per the script example.
If we cannot remove the Google Maps API script added by ACF in the backend, is there a way to add a callback (initAutocomplete) to the script like:
https://maps.googleapis.com/maps/api/js?key=MY-KEY-HERE&libraries=places&callback=initAutocomplete