The Events Near Me block

Available in:Pro

The Events Near Me block adds a search form to a page. Visitors type a town or a venue name, or share their position, and see the upcoming events near them without the page reloading.

The Events Near Me block is part of HappenBoard Pro. See what Pro adds.

Before you start

  • The search only finds events linked to one of your published venues. Events with no venue, or with only a venue name typed on the event, never appear.
  • A distance search also needs venues with a latitude and a longitude. See venues and coordinates.

Add the block

Insert the Events Near Me block on any page. It works for signed-out visitors, with nothing else to set up. Then adjust its settings in the sidebar:

SettingWhat it doesDefault
HeadingThe title above the form. Leave it empty to hide it.Find events near you
City placeholderThe grey hint inside the first box.City or venue name
Show country fieldAdds a second box for the country.On
Country placeholderThe hint inside the country box, while that box is shown.Country
Show radius sliderShows a slider for the distance. When off, the default radius still applies.On
Show “Use my location” buttonOffers the button that shares the visitor’s position.On
Default radius (km)From 5 to 500 km, in steps of 5.50
Maximum resultsFrom 5 to 100.20

The first four settings are in the Form panel, the next three in Radius search and the last one in Results. Distances are always in kilometres. If your site is not in English, replace the default heading and hints with your own wording.

  • The first box matches the venue’s name, street address, town, state and country, in part: typing lyon finds a venue in Lyon and a venue called Lyon Hall. It takes one term and does not search event descriptions.
  • The country box matches the venue’s country the same way. Fill in both boxes and a venue has to match both.
  • The distance only counts once the search knows where the visitor is: after they press Use my location, or when they open a link that already holds a position. Typing a town gives no position, so the distance has no effect on a text search.

The distance goes up to 500 km. For a wider search, use the town and country boxes. To filter a listing by category, tag or venue instead of by place, use the Filter Bar.

The visitor’s location and privacy

The block only uses a visitor’s location when they press Use my location. Their browser then asks for permission. That prompt comes from the browser, not from your site, and you cannot skip it.

  • If the visitor allows it, the button reads Location set, with a tick, and the search runs at once. Each result shows how far away it is, in metres under 1 km.
  • If they refuse, or the position cannot be found, the button reads Location denied, then goes back to its normal label. They can still search by town.
  • If their browser cannot share a position, the button is hidden.

The position goes from the visitor’s browser to your own site only: no outside service receives it, and HappenBoard does not save it. It is written into the page address, though, so a bookmark or a shared link of that search contains the visitor’s coordinates. If you would rather not handle visitors’ positions at all, turn off Show “Use my location” button: the town and country search still works. Mention the feature in your privacy policy if you keep it (see GDPR and personal data).

The results

Results cover published events from now to two years ahead. A recurring event appears once, on its next date. With a position, the list is sorted by distance, otherwise by date.

Each line shows the event title as a link and the date and time, or the date alone for an all-day event. It also shows the venue with its town and country, and the distance when there is one. If more events match than Maximum results allows, a line under the list says how many more there are. When nothing matches, the block says No events match your search yet. Pressing Search with every box empty does nothing.

Each search is written into the page address. A visitor can bookmark it or send it to someone: opening the link fills the form back in and runs the search again.

Next steps