The Google Routing field enables you to retrieve route information in WordPress forms. Simply specify two form fields to act as a start and end location and WS Form will automatically make the calculations for you.
The following information can be obtained using this field:
- Route distance
- Text description
- Value (miles, yards, kilometers and meters)
- Route duration
- Text description
- Value (seconds, minutes, hours, days, weeks and years)
- Summary (A short description of the route)
- Latitude and Longitude of Start and End locations
Furthermore the route can also be shown on a WS Form Google Map field.
The above information is retrieved using a single API call to the Distance Service API each time the start and end locations are completed and/or changed.
Demo
How It Works
When a user enters a start and end location, the Google Distance Service API will request route information. If a route can be determined, information about the route is populated to fields on your form. The Google Routing field itself can be used to show information or it can be hidden if it is not required.
The Google Routing field can be used in conjunction with Google Address fields for easy choosing of start and end locations, as well as the Google Map field to show the route on a map.
Each Google Routing component can be mapped to one or many fields on your form, giving you complete flexibility over how the data is used.
The output can also be used in conjunction with Conditional Logic, Calculated Fields and E-Commerce Fields.