In this guide, you’ll learn:
- How to add a complete route experience to Gravity Forms.
- How the Directions Field connects an origin, destination, optional waypoints, map, and directions panel.
- When to choose Directions instead of the lighter Distance & Duration Field.
Some forms need more than a saved distance. Visitors may need to see the road route, compare travel time, include intermediate stops, or follow step-by-step directions without leaving the form.
Gravity Geolocation’s Directions Field creates that complete route workflow inside Gravity Forms. It is included with Gravity Directions, Gravity Geolocation Toolkit, and Geolocation + Search Bundle.
What does the Directions Field do?
The field calculates a route between an origin and destination, with optional waypoint locations between them. Depending on the configuration, it can:
- Calculate road distance and estimated travel time with the Google Routes API.
- Calculate direct straight-line distance with the Haversine method.
- Draw the calculated route on a connected Map Field.
- Display step-by-step instructions in an optional Directions Panel Field.
- Save route legs, addresses, route geometry, travel mode, distance, duration, and related route information with the entry.

What a Directions setup requires
- Two Geocoder Fields for the origin and destination.
- Visible location inputs, such as Address, Coordinates, or Map Fields, connected to those Geocoder Fields.
- The Google Routes API for road routes, travel time, route maps, and turn-by-turn instructions.
- An optional Map Field for drawing the route.
- An optional Directions Panel Field for the route steps.
The Map and Directions Panel are optional. You can configure the field to save a route without displaying both components, although the full visitor-facing experience usually benefits from the route map.
Directions Field versus Distance & Duration Field
Both fields can calculate road distance, travel time, and straight-line distance. Their intended experiences are different:
- Use the Directions Field when the route itself matters. It supports waypoints, a route line on the map, optional step-by-step instructions, visitor-controlled travel options, and structured route data.
- Use the Distance & Duration Field when you primarily need calculated values for pricing, eligibility, exports, notifications, or other form logic. It does not display a route, accept waypoints, or populate a directions panel.
For the calculation-focused workflow, read Calculate Distance and Travel Time in Gravity Forms.
Useful route controls
Manual or automatic calculation
Display a button that lets visitors calculate and clear the route, or recalculate automatically when a linked route point or supported travel option changes.
Origin, destination, and waypoints
Select the Geocoder Fields that define the starting and ending points. Add one or more optional Geocoder Fields when the route must visit intermediate locations.
Travel mode and routing preferences
Choose driving, walking, bicycling, or public transit. The form can use an administrator-defined travel mode or a supported choice field that lets the visitor choose. Driving routes can also use traffic-aware preferences and options to avoid ferries, highways, or tolls when a suitable route is available.
Departure or arrival time
Configure the route for now, a specific departure time, or an arrival time. Supported Date, Time, and choice fields can let the visitor provide these values.
Common directions use cases
- Delivery and service requests: Show the route between a business and customer, including distance and estimated travel time.
- Event registration: Help attendees view directions from a chosen starting point to a venue or parking location.
- Transportation bookings: Collect pickup, waypoint, and destination locations while displaying the planned journey.
- Travel planning: Build a multi-stop route and save its structured information with the submission.
- Field-service workflows: Give staff or customers a route preview before the request is submitted.
How to add directions to a Gravity Form
- Add the visible origin and destination inputs.
- Add a Geocoder Field for each location and connect it to the appropriate input.
- Add the Directions Field and choose the origin and destination Geocoder Fields.
- Add any waypoint Geocoder Fields the route should visit.
- Choose Google Routes API or Straight-Line calculation.
- Configure the trigger method, measurement system, travel controls, time settings, and route restrictions.
- Optionally connect a Map Field and Directions Panel.
- Preview the form, calculate several test routes, submit an entry, and verify the saved route output.
Straight-Line mode calculates direct geographic distance and does not provide roads, travel time, waypoints, route steps, or a directions panel. Choose Google Routes API when those features are required.
Using the saved route
The Directions Field saves structured route data with the entry. Its merge tag can produce formatted HTML or use modifiers for outputs such as distance, duration, plain text, JSON, a map link, or route legs.
This makes the result available for confirmations, notifications, entry views, and supported integrations without recalculating the route from unstructured text.
Frequently asked questions
Is the Map Field required?
No. The field can calculate and save route data without drawing the route, although the map is useful when visitors need to understand the path visually.
Are step-by-step directions required?
No. Add and connect a Directions Panel only when the route steps should appear in the form.
Can visitors choose the travel mode?
Yes. Connect a supported Dropdown or Multiple Choice field whose values match the available travel modes.
Can it calculate a route with multiple stops?
Yes. Add waypoint Geocoder Fields between the origin and destination when using Google Routes API routing.
Build a complete route experience
The Directions Field is the right choice when users need to see and interact with a route—not merely store a distance value.
Follow the Directions Field documentation, learn about the Directions Panel, or compare current plans.
