Getting Started: Choosing a Form and a View Layout

We will start by clicking on the Add View link in the “Views” menu on our Dashboard, then adding our future View title:

 

Next, we need to define the source of information we will use to start designing our View. There are two ways to create a View: Use a Form Preset or using an existing form as the data source for our View.

1) Use a Form Preset

When choosing this option, it means you will use a View preset form instead of an existing form from your Gravity Forms. When you save the View, GravityView will create a new form for you in Gravity Forms. The created form will include all the fields you need for each preset purpose:

2) Choosing a layout for an existing form

If you decide to “use an existing form” to pull information from in order to design your View you will need to select a layout from one of those below:

The Table View and the Listing View are the default View layouts.

Adding Fields to the Multiple Entries and Single Entry Pages

After selecting a View layout, the View Configuration meta box shows up. In this meta box, we will find three tabs at the top which correspond to the three available pages which a View is composed of. 

  • Multiple Entries: this page is the main table of your View, where your form entries will be displayed one after another in separate rows, each row is an entry and each column in a row is a field from your form (assuming you are using the Table View layout).
  • Single Entry: Sometimes your entries have so many fields they don’t fit in your main table, that’s why the Single Entry page exists, to show additional entry fields. 
  • Edit Entry: If you want to edit fields from an entry, you can do that on the Edit Entry page. On this page, you can select which fields from the entry are available for modification. This page can be accessed through a link put on the Multiple Entries page or the Single Entry page.

Now that we established what each of these three tabs (also called screens or pages in the front-end of your website) are used for, we can start adding fields to them.

The Multiple Entries tab

This tab is divided into three sections: 

  1. Above Entries Widgets
  2. Entries Fields
  3. Below Entries Widgets. 

Let’s make a brief stop here to explain two important concepts that we need to understand: Fields and Widgets:

  1. Fields come from your entry, they are the same fields that exist in your form. 
  2. Widgets are tools for your table, like a Search Bar or Pagination links, they are not specifically related to your form or an entry.

This being said, on this tab, you have two main sections to add Widgets ( above and below your table) and just one section to add Fields (your table). Each   field   added to your table, depending on which layout you choose, will become a table column (where each row is an entry).

This is how the Multiple Entries tab will look like on the front-end of your website:

The main difference between the Multiple Entries tab (or page) for the Single Entry and the Edit Entry tab, is that the latter two do not support widgets, just fields.

If your entries contain too much data, it will be wise to display the most important fields in the Multiple Entries page and leave the additional information to the Single Entry page. To do that, you will need to add a link to the Single Entry page in your main table. 

Configuring the Edit Entry screen

The Edit Entry screen is the place on the front-end of your website where the entry creator (or an Administrator) will be able to modify the field values from that specific form submission.

You can choose which fields are editable in the Edit Entry screen.

If you want the user who created the entry to be able to edit the entry, check the “Allow User Edit” checkbox

If the box is not checked, only Administrators and users who have access to editing Gravity Forms entries in the WordPress Dashboard will be able to see the Edit Entry links and edit the entry. 

 

1. Go to All Views

2. Click on the View you would like to Edit

 

3. If your View doesn’t already have an Edit Entry field, add one

For Edit Entry to be possible on a View, there needs to be an Edit Entry field. This will add a link to the edit entry screen on your View.

3.1 Click the Single Entry tab

You can also add an Edit Entry field on the Multiple Entries page.

 

3.2 Click Add Field in the zone where you want the Edit Entry link to appear

 

3.3 Scroll down to “Edit Entry” and click on it

 

You can configure link text and other settings by clicking on the gear icon

Okay, now we’ve added an Edit Entry field. Let’s configure the Edit Entry View layout.

 
 

4. Click on the Edit Entry tab available in the View Configuration box

This step and the steps below only apply to GravityView 1.5 or higher.

 

You will see an empty configuration

When the Edit Entry configuration is empty, all form fields will be displayed as editable. If the Edit Entry tab is configured with fields, then GravityView will only show these fields on the Edit Entry page. 

5. Click the “+ Add Field” button to add a field to be edited.

 

6. Click fields to add them to the configuration

 

In this example, we have added four fields

 

You can drag and drop the fields in the order you desire

 

7. To limit field editing capabilities, click the gear icon

 

You can make fields editable by only Administrators

This is helpful if you have “Allow User Edit” enabled, but you don’t want to allow editing of a field by the user who created the entry. In this example, Administrators will still be able to edit the field in the Edit Entry screen.

 

8. Update the View

Everything is now configured!

 

Visit the View and edit an entry to see the Edit Entry configuration

Let’s take a look at the Edit Entry functionality.

 

What administrators see

All the fields are visible in this screenshot because we’re logged in as administrators.

 

What the Entry Creator sees

The Entry Creator won’t see any of the fields that are limited by role in Step 7. In this example, the Company Name is not visible.

A Single Entry link is a link to a single, select entry. The point of using a Single Entry is to make your landing page view condensed to the user. The user will then just see for example a company name in a list, but when clicking on the Single Entry link,  the user will be able to edit all the entries you have configured. You can link to the single entry in different ways:

1. In Multiple Entries, configure a field to link to the Single Entry

You can click the gear next to a field to access the field settings. Once there, you can check the box labeled Link to single entry (if available; some fields won’t have this).

That will convert the field content into a link, for example, a name. That link will go to the Single Entry view.

2. Add a dedicated Link to Entry field

Click the Multiple Entries tab. Once there, click the + Add Field button.

In the field picker, scroll down until you see a field named Link to Entry. Click on that to add it to your View. That field will now be a link to the Single Entry view.

 

Using the Shortcode

You can embed GravityView in a post or page.

You can embed GravityView Views in posts or pages by using the  shortcode.

Shortcode Parameters

  • id – The ID of the View you want to display (required)
  • page_size – Number of entries to show at a time (Defaults to View setting)
  • sort_field – What form field id should be used to sort? (See note)
  • sort_direction – ASC / DESC
  • search_field – Only display entries with this text in the value (See note)
  • search_value – Only display entries with this text in the value
  • search_operator – Change the type of search to be performed. Default is “contains”, which matches all results that contain the search_value. Possible values include: ‘is’, ‘isnot’, ‘<>’, ‘not in’, ‘in’, ‘>’, ‘<‘, ‘contains’, ‘starts_with’, ‘ends_with’, ‘like’, ‘>=’, ‘<=’
  • start_date – Filter the results by date. This sets a limit on the earliest results shown. In YYYY-MM-DD format. You can now use relative dates.
  • end_date – Filter the results by date. This sets a limit on the latest results shown. In YYYY-MM-DD format. You can now use  relative dates.
  • class – Add a HTML class to the view wrapper
  • offset – This is the start point in the current data set (Count starts with 0)
  • single_title – Define a custom single entry view title (default: post/page title)
  • back_link_label – Define a custom single entry back link label (default: ← Go back)
  • post_id – When using the shortcode in a widget or template, you may want to specify a page where a View is embedded as the base URL for entry links. Default: NULL (added in Version 1.4)
  • detail – Display specific information about a View Read more below

Note: You can find the field ID by looking at each field’s title in the Gravity Forms Form Editor

Examples

This shortcode will display entries for View #123

Only search for “Example” in the field ID #5 for View #123.

Display the View, but have entries link to the post with ID of 40. Instead of yoursite.com/view/123/entry/5/, the entry would link to yoursite.com/post-40-url/entry/5/.

The detail Shortcode Parameter

When the detail parameter is defined when using the  shortcode, the shortcode will output information about the current View. It must be used inside a View’s Custom Content field to display accurate information.

Possible Values

  •  The total number of entries that are in the View. If displaying search results, the number of matched entries. (100 in the below example)
  •  (26 in the below example)
  •  (50 in the below example)
  •  The number of entries that are visible on a single page. If all entries are displayed, then the value will be the same as total_entries (25 entries were displayed in the below example)