Documentation

Geocoder Field

Last modified: March 2, 2025

Introduction

The Geocoder Field in WPForms Geolocation is a hidden yet integral field that facilitates seamless synchronization between geolocation fields in your form. By managing and updating location data across fields such as Address, Coordinates, Locator Button, and Google Map, the Geocoder Field ensures accurate and dynamic user interactions.

This field offers various configuration options, such as default location settings, marker behavior controls, and field synchronization preferences. These options allow you to tailor the geolocation experience to fit your form’s needs. Learn more about geolocation synchronization in Synchronizing Geolocation Fields.

Configuring the Geocoder Field

Use the following options to configure the Geocoder Field settings:

Geocoder field options
Options available for configuring the Geocoder Field in WPForms Geolocation.

2. Default Coordinates

Specify the latitude and longitude for the starting location when the form is loaded. The default coordinates will be used for initial geocoding only when the Geocode on Page Load option is enabled. Otherwise, they will be used for placing the marker on the map (if a Map Field exists) without geocoding.

Default Latitude

Define the latitude for the initial location to display in geolocation fields (Example: 40.712776).

Default Longitude

Define the longitude for the initial location to display in geolocation fields (Example: -74.005974).

Geocode on Page Load

Enable geocoding for the default location upon form load.

Option: Check to enable.

3. Map Marker Options

Adjust how the map marker behaves and appears on the map.

Marker URL

Specify a custom marker image URL (Example: https://maps.google.com/mapfiles/ms/icons/blue.png).

Marker Info Window Content

Define content to display in an info window when the marker is clicked. Leave blank to disable the info window (Example: Hello World!).

Hide Marker on Initial Load

Prevent the marker from displaying when the form first loads. It will appear after geocoding or user interaction.

Disable Marker Dragging

Lock the marker in place to prevent it from being dragged by users. However, the marker's position will still update when interacting with other geolocation fields, such as entering an address or using the Locator Button.

Move Marker Using Map Click

Allow users to reposition the marker by clicking on the map.

Disable Address Output

Disable updates to Address Fields when moving the marker. This can be helpful for fine-tuning coordinates without affecting the entered address.


Setting Up and Using the Geocoder Field

Follow these steps to set up and use the Geocoder Field effectively:

  1. Add the Field: Drag and drop the Geocoder Field into your form using the WPForms editor.
  2. Configure Defaults: Set default coordinates and marker options as required.
  3. Link Fields: Connect Address, Coordinates, and Map Fields to the Geocoder Field to enable synchronization.
  4. Customize Marker Behavior: Adjust settings such as marker visibility, dragging permissions, and click actions.
  5. Test the Form: Preview and test your form to confirm proper synchronization and geolocation functionality.
menu-circle