WPForms Dynamic Geolocation Field
Introduction
The WPForms Dynamic Geolocation Field in WPForms Geolocationdynamically populates form fields with geolocation data retrieved from the Geocoder Field or Directions Field. This feature enhances user experience by automating field inputs with accurate geolocation data, minimizing manual entry.
Common use cases include:
- Automatically filling address fields after selecting a location.
- Displaying distances and travel times based on calculated routes.
- Using geolocation data in calculations, such as delivery fees based on travel distance.
The Dynamic Geolocation Field integrates seamlessly with WPForms' conditional logic and notification features. For instance:
- Show or hide fields based on geolocation data (e.g., distances or regions).
- Send notifications to specific recipients based on user location or calculated distances.
Dynamic Geolocation Field Types
WPForms Geolocation supports two primary types of dynamic fields:
WPForms Dynamic Location Field

The Dynamic Location Field automatically populates location-related data from a Geocoder Field. Available data includes:
- Place Name
- Street Number
- Street Name
- Street (Street Number + Street Name)
- Street (Street Name + Street Number)
- Premise (e.g., Apartment/Suite Number)
- Subpremise
- Neighborhood
- City
- County
- Region Name (e.g., State/Province Name)
- Region Code (e.g., State/Province Code)
- Postcode (Zip Code/Postal Code)
- Country Name
- Country Code
- Address (As entered by the user)
- Formatted Address (As returned by the Google API)
- Latitude
- Longitude
- Coordinates (Comma Separated)
- Coordinates (Serialized)
- Address + Coordinates (Serialized)
- Place ID
WPForms Dynamic Directions Field

The Dynamic Directions Field automatically populates route-related data from the Directions Field. Data types include:
- Distance text (e.g., "35 miles" or "25 kilometers").
- Distance value (e.g., "35", "25").
- Distance in meters: For precise measurements.
- Duration text (e.g., "2 hours 25 minutes").
- Duration in seconds: Useful for calculations.
This field can also streamline workflows by dynamically populating distances into Number Fields and using WPForms' calculation features for cost-based operations.
WPForms Dynamic Geolocation Field Options
The Dynamic Geolocation Field offers flexible configuration options to populate geolocation data dynamically. Supported field types include Single Line Text, Checkboxes, Dropdown, Hidden, Numbers, Multiple Choice, Address, and Paragraph Text.

Use Cases and Advanced Options
The Dynamic Geolocation Field in WPForms Geolocation offers versatile applications, including:
- Conditional logic based on geolocation data.
- Notifications triggered by user location or distances.
- Cost calculations for services like deliveries or ridesharing.
How to Use Dynamic Geolocation Fields
Follow these steps to configure a form that populates a Text Field with a ZIP code dynamically:
Add a Geocoder Field: Insert the Geocoder Field into your form. This field is required to process and sync geolocation data with other geolocation fields.
Add Geolocation Fields: Include geolocation fields such as the Address Field or Map Field into your form. Sync these fields with the Geocoder Field to enable geolocation data processing and synchronization.
Add a Text Field for ZIP Code: Add a Single Line Text Field to your form and label it "ZIP Code." Configure it as a Dynamic Location Field by:
- Setting the Field Usage to Dynamic Location Field.
- Linking it to the Geocoder Field.
- Choosing ZIP Code as the Field Value.
Test the Form: Preview the form and test it by entering an address in the Address Field. Ensure that the ZIP Code is automatically populated in the Text Field labeled "ZIP Code."
Note: Make sure all geolocation fields, including the Geocoder Field, are properly configured and synced for the dynamic population to work. For more details, see Geolocation Field Syncing.
Helpful Links
- Google Geolocation API - Learn how Google retrieves location data.
- Google Maps Directions API - Explore route calculations and travel distance APIs.
- WPForms Geocoder Field Documentation - Configure geolocation-based fields.
- WPForms Directions Field Documentation - Learn how to display routes and calculate distances.
- WPForms Geolocation Field Syncing - Guide on syncing geolocation fields.