Create A Gravity Form
First you start by creating a Gravity Forms Form using menu “New Form”, call it e.g. “SLP Basic Form”.
On this form, you can create a number of fields with different parameters. Try creating a form with a Advanced Fields “Name” and “Address” and a Standard Field “Single Line Field”.
In the form edit screen, you can change the ‘name’ of the fields, e.g. “Store Name” and “Zip” respectively.
Map Form Fields To Locator Fields
Next, you create a new mapping, using the menu GFL Mappings.
It is a custom post type, so you can name it anything you like, e.g. “Basic SLP Mapping”.
On the edit screen, you have a section “Configuration” with some drop down fields. The first drop down list should show a list of all GF forms defined earlier, so it should contain “SLP Basic Form”. The Condition can be left for later.
The remainder of the drop down fields should reflect the SLP database fields. The number depends on the other add-ons you have installed. It should show at least the basic SLP fields like “Name”, “Address”, “City”, etc.
If you have the Power Add-on with Contact Extender enabled you should also see fields like “Department”, “Facility”, etc.
Each SLP field has a drop down list showing all the fields defined in the GF form. The list is populated by Ajax and thus will change when you select another form in the first “Gravity Form” field.
If you select “SLP Basic Form”, you should see the fields “Store Name” and “Zip” based on our example. If you added more fields to your form you should see an entry for each item you added to your Gravity Form earlier.
By selecting the field, you create a mapping. You could e.g. select the “Hours” GF field to be assigned to the “Tags” SLP field. Each mapping is a relation between two fields from the different data sets. It can be a one-to-many or one-to-one relation; in other words you can assign the any GF field such as “Hours” to many SLP fields.
This should complete the back-end configuration.
Gravity Forms Locator Handling
Go the Gravity Forms tab in Store Locator Plus and update the settings to change how new locations are handled.
Publish Your Form
Now for the front-end.
First create a post (or page) for the GF form using a GF shortcode. Editing the post shows you a button “Add Form” which can help adding the form.
Use this post to generate some entries. For a decent test, you should use some nice address values. When a form is submitted, the data entered is used to also generate an SLP entry according to the mapping defined for that form.
When people fill out the form their locations will automatically be added to the map.