Mapster Map Gravity Forms Field

Add a field to your gravity forms to allow entering of geographic data with ease.

In addition to an ACF field, Mapster also includes a geographic field you can use with Gravity Forms! This lets you capture geographic information from users and also to display it using a variety of tools.

This feature is relatively new and currently quite simple. If you want any more convenience features or minor changes, please let us know and we'll get on it!

Start off by going to Forms after you've installed both Gravity Forms and the Pro version of the Mapster WP Maps plugin. Create a new form. Then go and select the Mapster Map field from the right-hand side.

When you've added the field, then click on the field to change its settings.

Set the Field Label (the name of the field), the starting Center Latitude and starting Center Longitude, and the starting Zoom level.

If you're having trouble with these, try making a normal Mapster map and see what the best zoom and center are, and copy-paste those settings here.

To preserve fast loading, Mapster doesn't automatically load the map Javascript before you add the form — so after you create it, you'll need to Save Form and reload the page to see the map.

Once you reload, you'll see something like this:

From here, you can change the Map Type between Satellite and Streets.

You can also select the Geographic Type you want users to be able to submit: Point, Line, or Polygon. the tools in the top left of the map will change accordingly.

Now your form is ready for your users or your admins to use!

To use it on the front end, simply have users click the icon in the top left and draw on the map. When they add a point or draw a line, everything will be saved in the database as GeoJSONs.

Once a user has submitted, you will see the responses in the Entries area of Gravity Forms. By clicking on one, you'll see the submitted geography displayed on a map.

With this, you've now saved user input on geographies inside Gravity Forms! Good job.

Last updated

Was this helpful?