Documentation

Locator Button Field

Last modified: September 11, 2026

Introduction

The Locator Button Field lets a visitor retrieve their current location and send it to a selected Geocoder Field. The Geocoder then updates the linked Address, Coordinates, and Map fields.

Browser geolocation normally requires HTTPS and user permission. A configured IP-location provider can be used as the default method or as a fallback.

Configuring the Locator Button Field

Locator Button Field options
Locator Button Field settings.

1. Geocoder Field

Select the Geocoder Field that should receive and process the detected location. All fields linked to that Geocoder can then update together.


2. Button Text

Customize the visitor-facing button label (Default Value: Get my current position).


3. IP Address Locator

Choose how the configured IP-location provider participates in location detection.

  • Disabled: Use browser geolocation without IP location (Default).
  • Default: Use the visitor’s IP address as the primary location method.
  • Fallback: Try browser geolocation first, then use IP location if it fails.

An IP provider must first be configured under Forms > Settings > Gravity Geolocation.


4. Action Messages

Location Found Message

Set the message displayed after a location is detected (Default Value: Location found). Leave it blank to suppress the success message.

Hide Location Failed Message

Hide the front-end error message when location detection fails. The error can still be written to the browser console for troubleshooting.

Field Behavior and Saved Data

The Locator Button is an interface control. It does not save an independent entry value and should not be used as a conditional-logic source. The selected Geocoder Field stores the resulting location data, while other fields can use the Locator Button as a conditional-logic target.

Setting Up and Testing

  1. Add a Geocoder Field and the fields it should synchronize.
  2. Add the Locator Button and select that Geocoder.
  3. Customize the label, IP behavior, and messages.
  4. Preview the form over HTTPS and allow browser location access.
  5. Confirm that the Address, Coordinates, and Map fields update.
menu-circle