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

Gravity Forms Business Listings Premium Add-on Setup Guide

Updated 10 min read Gravity Forms Integrations A–Z
On this page
  1. Video walkthrough
  2. What You Get
  3. Requirements
  4. Quick Start
  5. Step 1: The Directory Type, the Status and the Owner
  6. Step 2: Keep Roles Safe
  7. Step 3: Map the Fields
  8. Step 4: Categories, Locations, Tags and Pictures
  9. Step 5: Expiry and Featured Listings
  10. Let Owners Edit Their Listing
  11. Log What Directorist Receives
  12. Contact the Listing Owner
  13. Merge Tags
  14. Questions People Ask
  15. Do I need a paid Directorist extension?
  16. Is it safe to put this on a public form?
  17. Does it replace the Directorist add listing page?
  18. Does it send my data to another service?

Video walkthrough

Gravity Forms Directorist: Business Listing Submissions with Approval (Free Directorist)
Watch the Business Listings add-on turn a Gravity Forms submission into a Directorist listing that waits for approval, then let the owner update it. Watch on YouTube

Business Listings joins Gravity Forms and the free Directorist business directory plugin. Directorist gives you a directory with listings, categories, locations and directory types, and its own add listing form. This add-on lets a Gravity Forms form do the same job with everything Gravity Forms is good at: multi-page forms, conditional logic, payments, spam protection and any field type. A feed on the form turns each entry into a real Directorist listing, with the owner, the fields, the terms and the pictures. It can also let an owner edit the listing from a pre-filled form, log what Directorist receives, and send a message from a listing page to the right owner without printing an email address in the page.

A Gravity Forms add your business form whose category, location and directory type lists are filled from Directorist: Restaurants with Pizza below it, Shops, Downtown and Harbour
The lists are filled by the add-on from your Directorist categories, locations and directory types.

What You Get

  • A feed called Create a Directorist listing. When the form is sent, or when its payment is completed, it makes the listing as pending, published or draft, owned by the logged-in user or by a safe account.
  • Mapping to the title, description and excerpt, to the built-in fields (tagline, address, zip, phones, fax, email, website, video, map position, price, price range and social links) and to the custom fields of the directory type.
  • Categories, locations and tags from your form, checked against the directory type. Pictures from a file upload field: the first is the featured image, the others the gallery.
  • An expiry in days, never, or the default of the directory type, and a featured flag that can depend on a paid entry.
  • The same feed in update mode: the logged-in owner opens a link, the form is filled from the listing, and the owner changes only the listing that belongs to them.
  • A feed called When Directorist receives or publishes a listing, which adds an entry, sends notifications, or both.
  • A feed called Contact the listing owner for a form on a single listing page, with a merge tag for the owner email that is never printed in the page.
  • Choices filled with your categories, locations and directory types, merge tags, conditional logic, entry notes and a clear notice when Directorist is missing or too old.

Requirements

You need Gravity Forms 2.9 or newer, WordPress 6.5 or newer, PHP 7.4 or newer and the free Directorist plugin, version 8.0.0 or newer. The add-on was tested with Directorist 8.10.5. Nothing is sent to an outside service. Only the license check talks to the GravityExtra site.

Quick Start

  1. Install and activate the add-on and the free Directorist plugin, then activate your license key under Forms, Settings, Business Listings.
  2. Build a form with a business name, a description, an email and the details you want. Add a file upload field if you want pictures.
  3. Open the settings of the form, choose Business Listings and add a feed. Keep the action Create a Directorist listing.
  4. Choose the directory type and the status, map the title and the other fields, and save.
  5. Send a test entry. Open the entry: the notes say which listing was made, in which directory type, with which status and expiry.

Step 1: The Directory Type, the Status and the Owner

If your site has one directory, leave the directory type on the default. If you run several, choose one in the feed, or let a field decide: the answer can be the id, the slug or the name of a directory type, and when it matches nothing the directory type of the feed is used. The custom fields, categories and locations that can be filled are the ones of that directory type.

The status of a new listing is your choice: pending review, published at once, draft, or whatever the directory type says. Pending is the default, because a form is a public door and a moderator should look at the first listings.

A logged-in user owns the listing they send. A visitor gets a new account made from the email in the form, with a username made from the name. The feed never takes over an existing account. If the email already belongs to someone, the default is to refuse: nothing is created and the entry gets an error note. The second choice uses that account as the owner, and nothing else about the account changes: name, password and role stay as they are. Accounts that can manage the site or other people’s content, such as administrators and editors, are always refused, because a public form must not decide what such an account owns.

The Business Listings feed settings in Gravity Forms: the listing mode, the directory type, the status of the new listing, the owner rules and the account fields
One feed: the directory type, the status, the owner and what to do with an existing email.

Step 2: Keep Roles Safe

A new account gets the WordPress default role unless you choose another one, and the list holds only safe roles. Directorist gives authors, contributors and subscribers the right to manage their own listings, and that is all an owner needs. Administrator, Editor, Author and any role that can edit other people’s content, edit users, upload files, install plugins or manage the site are never offered, and they are refused again when the feed runs. You can tick whether the new owner gets the standard WordPress e-mail with a link to set a password.

Step 3: Map the Fields

The title is the only value that must be mapped. Everything else is optional, and a value that is not mapped is never written. Text is cleaned like Directorist cleans it: links must start with http or https, emails must be valid, phone numbers lose stray characters, the map position needs both a valid latitude and a valid longitude, and a price must be a number. A value that cannot be used is left out and the entry gets a note that says why, so a typing mistake never breaks the listing.

Custom fields come from the directory type. Pick the Directorist field on the left and the form field on the right. The add-on checks every value against the field type and its options: a choice that is not one of the options, a text where a number is needed, or a field that belongs to another directory type is not written, and a note says so. Check boxes keep only the options that exist.

Step 4: Categories, Locations, Tags and Pictures

Pick the form field for each term list. The answer can be the id, the slug or the name. Only terms that exist and belong to the directory type are used, so a visitor can not push a listing into another directory. Tags can be created on the fly if you allow it, up to ten per listing. To fill a drop down, radio buttons or check boxes with your own terms, choose the field under Choices. The list shows children below their parents.

For pictures, pick a file upload field. The first picture becomes the featured image and the rest the gallery. Only real jpg, png, gif and webp pictures up to 8 MB that sit in the Gravity Forms upload folder are used, each one is copied to your media library under the listing, and the number is capped so a form cannot fill your library. A file that is not a picture, a script, or an address that points outside the upload folder is skipped with a note.

By default the new listing follows the directory type: its default expiration, or no expiry. You can set a number of days, or never. A second number of days applies only when the entry is paid, which fits a form that sells a longer listing. A featured flag can be off, on for a paid entry, or always on. For a paid listing connect a payment add-on and tick the option to save the listing only when the payment is completed. Until then no account and no listing exist, and when the payment goes through the listing is made once.

By default the add-on also runs the Directorist actions for a new listing, so the e-mails that Directorist sends to the administrator and to the owner, and other Directorist add-ons, behave as if the listing had come from the Directorist form. You can turn that off in the feed.

A Directorist listing page for Harbour Street Coffee, created from a Gravity Forms entry with a featured picture, a gallery, a category, an address and a phone number
The listing made from the form, shown by Directorist with its picture, gallery and details.

Let Owners Edit Their Listing

Add a second form for edits and give it a feed with the mode Update. Map the same fields. The owner opens the form with a link that ends in gfdir_listing and the number of the listing, for example from a button on the listing page. The gfdir_edit_link shortcode builds that link and shows it only to the author of the listing. The form is filled from the listing: the text, the built-in and custom fields, the category and location, and the ticked boxes. Another user, or a visitor, sees a short message and no form.

The check is made again when the form is sent, with the logged-in user and the author of the listing, so a link changed by hand does nothing. Only the fields you map are changed. A mapped field that the owner empties is cleared in the listing. Pictures are replaced only when a new picture is uploaded. After an edit the status follows the Directorist edit setting, which can send the listing back to pending review, or you can keep the status it has.

Log What Directorist Receives

The event feed listens to Directorist. One event is a new listing sent through the Directorist add listing form. The other is a listing that changes to the published status, whoever does it: Directorist, a moderator or another add-on. For each event the feed can add an entry to a form, send that form’s notifications, or both. The entry can hold the title, link, id, status, directory type, categories, locations, owner and emails of the listing. You can limit the events to some directory types. Listings that a Business Listings feed makes do not start event feeds, so two feeds on one form never loop. It is a quick way to build a moderation queue, a team alert or a log.

Contact the Listing Owner

Put a Gravity Forms form on a single listing page, for example with the Custom Content block of the Directorist single listing builder and the form shortcode. Give it a feed with the action Contact the listing owner, and use the merge tag {gfdir_owner_email} as the Send to email of a notification. The page carries only a signed listing number. The address is looked up on the server when the message is sent, so it is never in the page for a spam robot to read. A changed number is refused, a listing whose owner has hidden the contact form shows no form, and a message from a page that is not a listing page is refused. You can send to the listing email, to the owner account, or to the listing email and then the account.

Merge Tags

  • {gfdir_listing_title}, {gfdir_listing_url}, {gfdir_listing_id} and {gfdir_listing_status} for the listing of the entry.
  • {gfdir_directory}, {gfdir_categories} and {gfdir_locations} for where it sits.
  • {gfdir_expiry} for the expiry date and {gfdir_edit_url} for the Directorist edit link.
  • {gfdir_owner_name} and {gfdir_owner_email} for the owner. The email tag is meant for the Send to field of a contact notification.

The tags appear in the merge tag list of the form editor. Notifications get two new events, Directorist: listing submitted and Directorist: listing published, on forms that have an event feed.

Questions People Ask

Do I need a paid Directorist extension?

No. The add-on works with the free Directorist plugin and its directory types, categories, locations and custom fields.

Is it safe to put this on a public form?

The add-on never takes over an existing account, never hands out a role that can manage the site or other people’s content, checks every value and every term, copies only real pictures from the form uploads, and gives you the choice to keep new listings pending.

Does it replace the Directorist add listing page?

No. Directorist still has its own form and dashboard. Business Listings is for the cases where a Gravity Forms form is the better door: a longer application, a paid listing, a form that is already part of your site, or a contact form on a listing.

Does it send my data to another service?

No. Everything happens on your own site.

Business Listings is part of the GravityExtra collection of Gravity Forms add-ons. See the Gravity Forms Business Listings Premium Add-on for the details.

See the Business Listings add-on

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