What Can You Use GravityView For?
Because Gravity Forms is so flexible, you can also use GravityView in a ton of different ways.
The biggest use case is probably any type of directory site, such as:
- Physical locations
- Digital information
You can use Gravity Forms to let people submit entries to your directory. You can even charge people for submitting entries via Gravity Forms’ built-in payment features. Then, you can use GravityView to automatically create the front-end database from those submissions.
The GravityView blog also details a lot of other interesting use cases, though. Two of my favorite examples are:
- Event planners using GravityView to create a public guest list for events.
- Collecting and displaying feedback.
So, really, if you get creative, you can use GravityView for a lot more than just directories.
How GravityView Works on a Real WordPress Site
Now that you understand what GravityView helps you to do, let me show you how everything works.
It all starts with a form, so, before installing GravityView, I used Gravity Forms to set one up.
I chose the example of a directory of WordPress developers. If a developer wants to list themselves in the directory, they can use the form to submit their details.
In this example, they can do this for free, but remember that you could just as easily charge people for the privilege using the Gravity Forms payment fields. Or, you could let people list for free but charge them for a sponsored listing.
So, now that I have that form (and some entries I submitted), we can take a look at how to use GravityView to display that information on the front end.
CREATING A NEW VIEW
As its name suggests, a specific front-end layout for your Gravity Forms entries is called a ‘view’.
When you go to create a new view, you can choose two different sources for your data:
- A Form Preset — use a preset template form from GravityView rather than one of your existing forms. It includes templates for business directories, human profiles, job boards and more.
- An existing form — choose one of your existing forms from Gravity Forms. That’s what I’ll do for this review because I already created the form above.
Once you choose your data source, you can select your View Type, which roughly defines the front-end layout for your data. With the core version, you can choose between a table or list view. You can also add the map and calendar layouts I mentioned using add-ons:
For this example, I’ll choose a list view.
CONTROLLING YOUR VIEW LAYOUT
Once you choose a data source and layout option, you can use a drag-and-drop builder to control the actual layout of your view using widgets.
You can design three pages in total:
- Multiple Entries — this template controls the list of all of the Gravity Forms entries.
- Single Entry — this template controls the dedicated page for a single entry. Usually, people navigate to this page from the multiple entries list.
- Edit Entry — this controls which fields people can edit from the front-end interface.
MULTIPLE ENTRIES TEMPLATE
For the Multiple Entries page, you can control three parts of the page:
- Above Entries Widgets — these widgets only appear a single time. For example, you can add a search bar or filters.
- Entries Fields — these ‘loop’ for each entry that you display. That is, they’ll repeat over and over to display the same details for each entry (much like your blog list page automatically lists all of your blog posts and repeats the same layout for each post).
- Below Entries Widgets — like the above entries widgets, these widgets only appear a single time. You can use them for things such as pagination or another search box.
For the above and below widgets, you can choose from a preset selection of widgets including:
- Show pagination info.
- Page links.
- Page size — let users change how many entries are displayed.
- Custom content — add your own static content.
- Search bar.
If you click on the gear icon next to a widget, you can control how that widget functions. For example, if you edit the search bar, you can limit it to only search for specific fields in each entry and configure some other settings:
You can also add additional widgets with add-ons, which I’ll touch on later.
For the entry fields, you can choose the actual form fields from the form you selected earlier.
For example, you can set the title of each listing equal to the name field from your form:
You can add fields to all of the different layout areas for your chosen layout, and use drag-and-drop to move fields around as needed.
One thing to note is that you’re limited to the preconfigured layout (e.g. ‘Listing Title’, ‘Subheading’, ‘Footer Left’, etc.)
If you know your way around HTML and CSS, GravityView does offer a tool to make it easy to create your own layouts without editing template files. However, if you don’t know HTML and CSS, you’re limited to the preset layouts — although you can arrange your fields in any order within those layouts.
Here’s what it looked like after I added all of the fields from my example form:
If you click on the gear icon next to a form field, you can edit that field. For example, you can only show some fields to logged-in users, or link a field to the single entry page.
Some fields also get additional settings. For example, for a location field, you can add a ‘Map It’ link to help people find the location using Google Maps:
SINGLE ENTRY TEMPLATE
In the Single Entry tab, you can use an identical interface to design the layout for the single entry page. Except now you only work with the form fields — there’s no need for search or pagination widgets because this template only displays a specific entry:
You can also add your own custom content using a Custom Content field if needed, as well as fields to let people edit or delete entries:
As with the multiple entries template, you’re limited to this preset layout arrangement unless you know your way around HTML and CSS.
EDIT ENTRY TEMPLATE
Finally, you can control the layout for the Edit Entry template. Again, these are the fields that logged-in users will see when they try to edit one of their own entries.
You can use this so that people can only edit certain fields, rather than the entire entry.
For example, I can set it up so that WordPress developers can edit all of the fields except for their name:
The final thing you need to configure before publishing your view is the overall View Settings.
Here, you can configure a bunch of smaller general settings, such as:
- whether or not to hide empty fields
- sort behavior
- whether to show all form entries or only entries you’ve manually approved
- whether logged-in users can edit their own entries.
And that’s it! Now you can publish and display your view anywhere on your site using the provided shortcode.