Drupal is a registered trademark of Dries Buytaert

eps

No security coverage
View on drupal.org

Introduction:

Entity proximity select (Webform) provides a webform element that allows end users to find and select content entities (nodes, etc.) based on geographic proximity. Visitors can use their browser's geolocation or type an address to see nearby results sorted by distance. This is ideal for "find your nearest dealer/store/office" scenarios embedded in webforms.

Features

- Proximity-based entity selection — Sorts any content entity by distance using the Haversine formula, with locale-aware distance formatting (meters/kilometers).
- "Use my location" button using the browser Geolocation API.
- Address autocomplete search — Users can type an address to find nearby entities.
- Pluggable geocoding providers — Ships with two providers out of the box:
- Nominatim (OpenStreetMap)
- Google Places — Uses Google Places Autocomplete. (Requires a Google API key via the Geolocation module)
- Works with any entity type.
- Supports both geolocation and geofield field types for storing coordinates.
- Customizable UI texts — Button labels, placeholders, and separator text are configurable.
- You can alter the order of entity lists with hook_entity_proximity_entities_alter().

Post-Installation

1. Enable the module as usual (drush en entity_proximity_webform_select).
2. Add the element to a webform: Go to a webform's "Build" tab and add an "Entity proximity select" element (found under "Entity reference elements").
3. Configure the element:
- Select the entity type and bundle (e.g., Node → Store).
- Choose the geo field that stores coordinates (supports geolocation and geofield field types).
- Optionally choose a label field and a view mode entity display.
- Select a geocoding provider (Nominatim or Google Places) and configure its settings.
- Adjust UI texts, initial results count, and sort method as needed.
4. That's it — the element will display a list of entities with geolocation and search capabilities on the frontend.

Additional Requirements

- Webform (https://www.drupal.org/project/webform) — Required. The module extends Webform with a custom element.
- Drupal Core Node module — Required.
- A geo field on your content entities using either:
- Geolocation Field (https://www.drupal.org/project/geolocation), or
- Geofield (https://www.drupal.org/project/geofield)

For the Google Places provider only:
- Geolocation - Google Maps API (https://www.drupal.org/project/geolocation) submodule with a configured Google API key (Maps JavaScript API + Places API + Geocoding API).

- Geolocation Field (https://www.drupal.org/project/geolocation) — Recommended for storing coordinates and required if using the Google Places provider.
- Geofield (https://www.drupal.org/project/geofield) — Alternative field type for storing coordinates.

Similar projects

- In webform Entity Select provides entity reference selects but without geographic proximity features.

Entity proximity select (Webform) is specifically designed as a webform element combining entity reference selection with geographic proximity sorting and pluggable geocoding — a use case not covered by the above modules.

Supporting this Module

This module is maintained on a volunteer basis. If you find it useful, contributions (code, documentation, translations, bug reports) are always welcome.

Community Documentation

See the module's README.md for detailed developer documentation, including how to change the order of the entity list.

Activity

Total releases
4
First release
Feb 2026
Latest release
23 hours ago
Release cadence
7 days
Stability
100% stable

Release Timeline

Releases

Version Type Release date
1.0.3 Stable Mar 3, 2026
1.0.2 Stable Mar 3, 2026
1.0.1 Stable Feb 24, 2026
1.0.0 Stable Feb 10, 2026