Geolocation Fields Syncing
Introduction
Ninja Geolocation fields work as connected groups. A Geocoder Field processes and stores one structured location, while Address, Coordinates, Map, Locator Button, and other fields read from or update that Geocoder.
Important: Use the Address Field supplied by Ninja Geolocation. Ninja Forms' native Address field does not connect to a Ninja Geolocation Geocoder and cannot drive the plugin's synchronized fields.
Use one Geocoder Field for every independent location. For example, a travel or delivery form normally uses separate origin and destination Geocoders.
Configuring Connected Geolocation Fields
Select the appropriate source field in each field's Geolocation settings:
- Address, Coordinates, and Locator Button: connect to one Geocoder Field.
- Map: connects to one or more Geocoder Fields.
- Reset Location Button: resets one or more selected Geocoder Fields.
- Distance & Duration and Directions: select origin and destination Geocoder Fields.
- Directions Panel: is selected by a Directions Field as its visual instructions panel.
- Address Validation: reads a Source Geocoder and can send the selected result to an Output Geocoder.
- Nearest Locations: reads an origin Geocoder and can use a Map, a Nearest Locations Panel, and one or more Output Geocoders.
- Drawing Tools: connects to a Map Field. A Drawing Shape Field connects to Drawing Tools.
- Dynamic output: an ordinary supported Ninja Forms field selects both a geolocation source and the property it should receive.
The builder stores these relationships internally. You only need to select fields by their labels; you do not need to find or manage raw field IDs.
Setting Up and Using a Location Group
- Add a Geocoder Field for the location.
- Add an Address Field from the Geolocation Fields group and connect it to that Geocoder.
- Add a Map Field and select the same Geocoder.
- Optionally add Coordinates, Locator Button, and Reset Location Button Fields connected to that Geocoder.
- Save the form and test address selection, marker movement, coordinate entry, current-location detection, and reset behavior.
When a connected input resolves or changes a location, the Geocoder updates the shared structured record and refreshes the other connected fields according to their settings.
To collect a second location, repeat the process with a second Geocoder instead of connecting both independent locations to the first one.
Advanced Field Relationships
Advanced fields use the same connected-field model:
- A Distance & Duration Field can calculate between two Geocoders without displaying a route.
- A Directions Field can use origin, destination, and waypoint Geocoders, draw on a selected Map, and send instructions to a Directions Panel.
- An Address Validation Field listens for its Source Geocoder to finish resolving an address and can optionally update another Geocoder with the selected result.
- A Nearest Locations Field compares an origin Geocoder with configured destinations and can populate Output Geocoders with the selected destination.
- Drawing Tools owns the shapes collection displayed on a connected Map; Drawing Shape Fields contribute individual shapes.
Panel fields are visual companions. They do not replace the Directions or Nearest Locations field that owns the calculated result.
Saved Values and Dynamic Outputs
The Geocoder Field saves normalized location JSON. Connected fields may also save their own presentation value, such as a visible address, coordinate pair, map state, validation result, route result, or drawing data.
Geocoder dynamic outputs include:
- Place name and Place ID.
- Street number, street name, both street-order combinations, premise, subpremise, and neighborhood.
- City, county, region name, region code, postcode, postcode suffix, full postcode, country name, and country code.
- Formatted address.
- Latitude, longitude, and combined coordinates.
- Combined address-and-coordinate values.
- The serialized complete location record.
Other source families expose their own outputs, including distance and duration, validation status, nearest-location properties, and drawing measurements. Configure these through Dynamic Location Field Options.
Repeater Behavior
When connected fields are placed inside the same Ninja Forms repeater, their relationships resolve within the active row. Each row can therefore maintain its own location and route data as rows are added, removed, or reordered.
Keep the related source and target fields within the same repeater structure and test every row action before publishing the form.
Troubleshooting
The Address field does not update the Geocoder
Confirm that you added the Address Field from Ninja Geolocation's Geolocation Fields group, not Ninja Forms' native Address field, and that it is connected to the intended Geocoder Field.
A connected field does not update
Open the field settings, confirm that it references the intended Geocoder, Map, Directions, Nearest Locations, or Drawing Tools field, and save the form after changing the relationship.
Two location groups affect each other
Review every connected field and use a separate Geocoder Field for each independent location. Origin and destination controls should not share one Geocoder.
A repeater row uses another row's location
Keep the related source and target fields in the same repeater structure, save the form, and retest added, removed, and reordered rows. Clear page and asset caches after updating the plugin or form.