Documentation

Geolocation Fields Syncing

Last modified: March 2, 2025

Introduction

WPForms Geolocation Syncing enables seamless interaction between geolocation fields in WPForms. By syncing Address, Google Map, and Coordinates fields, the plugin ensures real-time updates and accurate location-based data across your forms.

Field syncing allows seamless communication between geolocation fields, improving accuracy and user experience. For example:

  • Dragging the map marker updates the Address Field and Coordinates Field with the corresponding location data.
  • Manually entering an address or coordinates moves the map marker to the correct location.
  • Using the Locator Button retrieves the user’s location and updates all relevant fields.

The Role of the Geocoder Field

The Geocoder Field is the core component of geolocation synchronization. It processes location data, performs geocoding, and ensures that all geolocation fields remain synchronized. Specifically, the Geocoder Field:

  • Geocodes manually entered addresses or coordinates.
  • Synchronizes the map marker and data retrieved by the Locator Button.
  • Maintains accurate data across all geolocation fields in the group.

Without the Geocoder Field, geolocation fields would not be able to communicate effectively, limiting the functionality of location-based inputs in your forms.

Linking Geolocation Fields to the Geocoder Field

To enable synchronization between geolocation fields, you must link each geolocation field (e.g., Address Field, Coordinates Field, or Google Map Field) to the Geocoder Field. This is done by selecting the Geocoder Field in the "Geocoder Field" option located in each of the geolocation field settings.

Creating Geolocation Groups

Geolocation groups allow you to organize and synchronize multiple geolocation fields. Examples include:

  • A group with only a Google Map Field.
  • A group with an Address Field and a Google Map Field.
  • A group with an Address Field, a Google Map Field, and a Coordinates Field.

For example, if your form requires users to enter both home and work addresses, you can create two geolocation groups, each with its own Address Field and Google Map Field.

What Happens After Form Submission?

After form submission, the synced Geocoder Field provides detailed geocoded data for each entered location. This data is available in entry details and email notifications. Examples of returned location data include:

  • Place Name
  • Street Number
  • Street Name
  • Street (number + name)
  • Street (name + number)
  • Premise
  • Subpremise
  • Neighborhood
  • City
  • Country
  • Region Name
  • Region Code
  • Postcode
  • Country Name
  • Country Code
  • Address (as entered by the user)
  • Formatted Address (as returned by the Google API)
  • Latitude
  • Longitude

Benefits of Synchronizing Geolocation Fields

Synchronizing geolocation fields ensures consistent and accurate location data throughout your form, creating a seamless user experience. Whether updating map markers, auto-filling address fields, or calculating distances, field syncing optimizes geolocation functionality and improves efficiency.

menu-circle