🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!

Gravity Forms Map Markers Premium Add-on Setup Guide

Updated 8 min read Gravity Forms Integrations A–Z
On this page
  1. Video walkthrough
  2. What you need
  3. Install and activate
  4. Add a feed to a form
  5. What a visitor sees and what you see
  6. Coordinates, geocoding and what is checked
  7. Keeping the marker and the entry in step
  8. Payments and delayed feeds
  9. Developers
  10. Privacy and security
  11. Troubleshooting
  12. Questions
  13. Does this need the paid WP Go Maps plugin?
  14. Can I put one submission on two maps?
  15. Do I need a geocoding key?
  16. Can visitors edit or delete their marker later?
  17. Is this the same as the address autocomplete add-ons?

Video walkthrough

Gravity Forms WP Go Maps: Let Visitors Add Map Markers, Approved by You (Free Plugin, No API Key)
Video tutorial: Gravity Forms Map Markers Watch on YouTube

The Gravity Forms Map Markers Premium Add-on puts a marker on a WP Go Maps map for each Gravity Forms submission. A visitor fills in a normal form, and the add-on saves a marker with a title, a description, a link and the position of the place. WP Go Maps then shows it like any marker that you added by hand.

The position comes from the form. Either the form has a latitude field and a longitude field (or one field with both numbers), or the form has an address and you let the add-on look it up with your own key from Google, Geoapify or Mapbox. The add-on never uses a key of ours and never sends anything when the form already gives the coordinates.

What you need

  • WordPress 6.5 or newer and PHP 7.4 or newer.
  • Gravity Forms 2.9 or newer. The add-on is tested with Gravity Forms 3.1.2 on PHP 8.3 and Gravity Forms 2.9.8 on PHP 7.4.
  • The free WP Go Maps plugin from WordPress.org. The add-on is tested with WP Go Maps 10.1.10 and uses the plugin’s own PHP classes to save markers, so the markers are the same as the ones made in the WP Go Maps editor.
  • An active license key for this add-on.
  • Only for addresses without coordinates: a key from Google (Geocoding API), Geoapify or Mapbox.

If Gravity Forms or WP Go Maps is missing, the add-on shows a notice, writes a note on the entry and does nothing else. The entry itself is always saved first, so no submission is lost.

Install and activate

  1. Install and activate WP Go Maps, then Gravity Forms, then this add-on.
  2. Open Forms → Settings → Map Markers and enter your license key.
  3. Only if you geocode addresses: paste the key of the service you will use in the same screen. The fields are password fields and the key is only used by your server.

Add a feed to a form

Open the form, go to Settings → Map Markers and click Add New. A feed is one rule: it says which map receives the marker and where each value comes from. You can add more than one feed to a form, for example to put the same submission on two maps.

The Map Markers feed settings of a Gravity Forms form: the map, the latitude, longitude and address fields, the marker title, description and link, approval and the sync options
The feed picks the map, the fields and the marker text.
  • Map: the list shows the maps of WP Go Maps by title and number.
  • Latitude field and Longitude field: pick the form fields that hold the numbers. A comma as the decimal sign is read too. If your form has one field with both numbers, such as 21.0285,105.8542, pick it as the latitude field and leave the longitude field empty.
  • Address field: an Address field (all its parts are joined), a text field or a hidden field. The address is shown in the marker, and it is geocoded when there are no coordinates.
  • When there are no coordinates: do nothing (the entry gets a note), or geocode the address with Google, Geoapify or Mapbox. Coordinates from the form always win; a geocoder is asked only when they are missing or not valid.
  • Title, Description and Link: text with merge tags. An empty title uses the address. The description is plain text; line breaks are kept and tags are removed. The link must start with http or https; anything else is dropped.
  • Icon address: the web address of a marker icon. Empty uses the icon of the map.
  • Show the marker: either after you approve it in WP Go Maps (the default and the safe choice for a public form), or at once.
  • Keep in step with the entry: update the marker when the entry is edited, and remove it when the entry is trashed, marked as spam or deleted.
  • Condition: the usual Gravity Forms feed condition, for example only when a box is ticked.

What a visitor sees and what you see

The visitor sees the form and the confirmation of Gravity Forms and nothing else. The add-on has no script and no style on the page.

A Gravity Forms form with the fields name, latitude, longitude, notes and website filled in, and a Submit button
The visitor fills in a normal Gravity Forms form.

On your side, the marker is saved at once. With the default setting it waits in WP Go Maps for your approval; open the marker list of the map and approve it, or delete it. When the setting is at once the marker is visible on the map when the page is loaded again.

A WP Go Maps map with a red marker at the place that a visitor sent with a Gravity Forms form
The marker appears on the WP Go Maps map once it is approved.

The entry gets a note with the marker number and the map number, so you can always find the marker that belongs to an entry. If something did not work, the note says why: no valid coordinates, no address to look up, the geocoder found no place, the key was refused, the map does not exist any more.

Coordinates, geocoding and what is checked

  • A latitude must be between -90 and 90, a longitude between -180 and 180. Text, an empty value, an exponent such as 1e1 and the point 0,0 (which an empty form would give) are refused.
  • The coordinates are saved in the same way that WP Go Maps saves them, in the text columns and in the spatial column, so the map, the marker list, the search and the store locator of WP Go Maps all find the marker.
  • The geocoder request goes only to the fixed address of the service you chose (maps.googleapis.com, api.geoapify.com or api.mapbox.com), with no redirects and a ten second limit. The key is only a query value on the server; it is never printed in a note or a log.
  • Mapbox results are requested as permanent, because the marker stores them, which is what the Mapbox terms ask for.
  • A country preference (two letters) in the settings helps when addresses do not name the country.
  • The add-on asks once per submission and only when the form has no usable coordinates. It does not cache and does not keep a list of addresses.

Keeping the marker and the entry in step

When you edit the entry in the Gravity Forms entry screen, the marker is updated: title, description, link, position. Your decision about approval is not undone. If you approved the marker, it stays approved after an edit. When you trash the entry, mark it as spam or delete it, the marker is removed. A marker that you added by hand in WP Go Maps is never touched, because the add-on only removes a marker it made itself, and it remembers that in the entry.

If the same feed runs twice for one entry, for example when you run the feeds again, a second marker is not made.

Payments and delayed feeds

The feed supports the Gravity Forms delayed feed setting. Tick Create the marker only when payment is completed and a paid listing appears on the map only after the payment, not at the first submission.

Developers

  • The filter gfmapmark_marker_fields receives the marker columns, the feed, the entry and the form just before the marker is saved. Return the array, changed. Return anything else to stop the marker.
  • Markers are saved through the classes of WP Go Maps (WPGMZA\Marker), one property at a time, so the hooks of WP Go Maps run as for any marker.
  • If WP Go Maps keeps its markers in the XML cache (a setting of WP Go Maps), the cache file of the map is rebuilt after each change.
  • The entry stores the marker number in the entry meta gfmapmark_marker_ followed by the feed number.

Privacy and security

With coordinates from the form, nothing leaves your server. With a geocoder, the address that the visitor typed is sent to the service that you chose, with your key, and the service sees your server’s address, not the visitor’s. Say so in your privacy policy. Visitor text is cleaned before it is saved: tags are removed from the title and the description, a link that is not a web address is dropped, and every value passes through the cleaning of WP Go Maps again. A public form can be spammed, so keep the default after I approve it unless the form is protected.

Troubleshooting

  • No marker and no note: check the license and that the form has an active feed with a condition that the entry meets.
  • The note says there is no valid latitude and longitude: check the fields of the feed, and that the form did not send 0 and 0.
  • The geocoder was refused: check the key, its quota and that the Geocoding API (Google) is switched on for it.
  • The marker is saved but not visible: it is waiting for approval, or the map you chose is another map than the one on the page.
  • The map shows old markers: clear the page cache and the cache of your REST API, if you use one.

Questions

Does this need the paid WP Go Maps plugin?

No. It works with the free WP Go Maps plugin from WordPress.org. Marker categories are a feature of the paid edition of WP Go Maps and are not set by this add-on.

Can I put one submission on two maps?

Yes. Add two feeds to the form, each with its own map.

Do I need a geocoding key?

Only if your form has an address and no coordinates. If a map field or two number fields give the position, you need no key.

Can visitors edit or delete their marker later?

No. The marker follows the entry, and you manage the entry in Gravity Forms. If you edit the entry, the marker follows.

Is this the same as the address autocomplete add-ons?

No. Address autocomplete helps a visitor type an address. This add-on takes what was submitted and puts a marker on a map. They work well together: autocomplete saves the coordinates in hidden fields, and this add-on reads them.

Still need help?

Our support team answers tickets every day, usually within a few hours.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr