That method requires using Caldera Forms Google geolocation add-on -- https://calderaforms.com/doc/using-geolocation-fields/ -- and the Caldera Custom fields add-on -- https://calderaforms.com/downloads/caldera-form-custom-fields/ --
After setting the Geolocation field processor :
-
create three hidden fields using {lat} {lng} and {post_type:ID} special magic tags as values.
-
paste the code wrapped as a custom plugin or in the functions.php file of the (child-)theme
-
change the form ID ('CF5a5e8452c6f82') with the correct ID
-
change all the field IDs from the form and ACF field ID
- $lat line is the hidden field ID that holds {lat}
- $lng line is the hidden field ID that holds {lng}
- $address is the field ID used for the geolocation
- $pid line is the hidden field ID that holds {post_type:ID}
- field_000000000 is to be edited with the ACF field ID