Hello @3vance
The use of this operation is very simple. I’ll try to describe it with a hypothetical example: assuming there is two text fields in the form for entering the addresses: fieldname1 and fieldname2, and you want get the distance in miles between them, you simply should insert a calculated field in the form with the following code as its equation:
DISTANCE(fieldname1, fieldname2, 'mi', 'DRIVING')
if you want get the distance in kilometers:
DISTANCE(fieldname1, fieldname2, 'km', 'DRIVING')
As this operation uses the Google APIs to get the distance, it requires that you generate a Google API Key (https://console.developers.google.com/apis/dashboard) to be used in your website domain, and you pass it to the form.
So, if the id of your form is 123, the form’s shortcode would be:
[CP_CALCULATED_FIELDS id="123" google_api_key="your api key here"]
replacing the text: your api key here
with the API Key you have generated from the Google Developer Console.
Best regards.