Formidable Forms

Formidable Forms

  • Features
  • Pricing
  • Resources
    • Docs & Support
    • Blog
    • Community
  • Solutions
    • Web Applications
    • Calculators
    • Surveys
    • Directories
    • Payments
    • Contact forms
  • Login
  • Get Formidable Forms

Advanced View Concepts

Last Updated: September 2, 2020

Knowledge Base → Views → Advanced View Concepts

There are virtually limitless possibilities for displaying data in a Formidable View. This article explains several commonly used View concepts that add more flexibility and functionality to your Views.

Formidable Forms is the best WordPress Form Builder plugin. Get it for free!

Set up a nested View

Typically, Views can only display data from one form. You can use a nested View, however, to display data from two forms inside of a single parent View. In order to set up a nested View, you must have a field in both forms that stores identical data. We'll refer to this field as the "shared field". It can be a user ID field, a field that stores a unique ID number, a Dynamic field, or even a Text Field.

The following instructions show one way you can can set up a nested View.

  1. Let's start by creating two forms. For this example we’ll have an “Employee Profile” form (Form A) which contains the fields “Name”, “Address” and “Employee ID Number”.We’ll also create an “Additional Details” form (Form B) which contains the fields “Employee ID Number” and “Date Of Birth”. For this example we will use the number field titled “Employee ID Number” as our shared field.
  2. Create a new View that displays entries from Form A; we'll call this View A. It will be the parent View that holds the nested View. We can now add some field IDs to the Content as if you were creating a basic View.
  3. Next, create a new View that displays entries from Form B; we'll call this View B. The View Format should typically be set to Single Entry. In the Content for this View, you should add the field IDs for the data you want to nest into View A — in this example it is our "Date of Birth" field. In the Content section, add a filter that says something like "Shared field is equal to [get param=pass_field]".
    Nested View Filter
    If you're using a User ID field as your shared field, your filter will say "User ID is equal to [get param=pass_field]".
    Nested View User ID Filter
    For our example, the filter is "Employee ID Number is equal to [get param=pass_field]"
    Nested View Example Filter
    NOTE: The "pass_field" parameter of the filter can be anything — it is not linked to a field title or ID. If you change pass_field for something else, it must also be changed in the shortcode in the next step. This part of the filter must match the shortcode exactly.
  4. Go back to View A. Add this shortcode for View B inside of View A's Listing Page or Detail Page Content. It will look like this:

    [display-frm-data id=x pass_field="[y]"]

    Replace x with the ID of View B. Replace y with the ID of the "shared field" from Form A. If your shared field is a userID field, add show=ID to the shortcode:

    [display-frm-data id=x pass_field="[y show=ID]"]

    For our example, the ID of View B is [158], our shared field (Employee ID Number) is [143], and our get_param value is "pass_field" — so our shortcode is:

    [display-frm-data id=158 pass_field=[143]]

    Nested View Example Content

  5. Publish View A on a page. Include filter=limited in the view shortcode you insert on the page. This tells the view to process the shortcode for View B. When you visit that page, you should see entries from Form A alongside values from Form B.

Link to a View from another View

There may be times where you would like to link to the detail page of one View (View B) from another View (View A). A real-world example of this would be a case where we have a list of applications that were submitted for a job. We could have View A list all of the applicant's names, and View B list all of the details for a specific application. In scenarios like this, you can follow the instructions below to link to View B from View A:

  1. Create a new View (View B) and add some content to it.
  2. Go to the Content section for View B. Add a filter that says Entry ID equal to [get param=id]. Now save your View.
    Dynamic View Filter
  3. Now that we have finished View B, let's publish it on a page. Make note of the URL of that page, as we will be needing it shortly.
  4. Create a new View (View A) and add some content to it.
  5. In the content box of View, we can add a link to View B. You link will most likely look like the following:

    <a href="url-to-page-with-View-B?id=[id]">View Application Details</a>

Duplicate Entries on the Front End

If you would like users to be able to duplicate an entry from the front-end of your site, follow the steps below.

  1. Create a View which displays entries for your user to duplicate.
  2. Add a Duplicate button link to the content of the View by adding the page URL that contains your form. The easiest way to duplicate entries is to use the same form for the original and duplicate entries. Add an entry key parameter to the end of this URL. Your HTML link will end up looking like this:

    <a href="mysite.com/mypage/?pass_entry=[key]">Duplicate</a>

    Leave [key] as it is. This will dynamically generate the entry key.

  3. If you have an embedded form, you'll also need the ID for the embedded entry. Add the ID of the embedded form field to the URL like this:
    mysite.com/mypage/?pass_entry=[key]&emb_entry=[25]

    Change 25 to the id of your embedded form field.

  4. Go into your form. Put [frm-field-value field_id=x entry=pass_entry] in each field and replace x with the ID of the field.
    • Add this shortcode in the field options in the Default Value box.
      Duplicate Other Field
    • If it is a Dynamic field, you will need to get the ID of of the linked entry. You can do so with this shortcode: [frm-field-value field_id=x entry=pass_entry show=id] where x is the ID of your Dynamic field.
      Duplicate Dynamic Field
    • If it is a field in an embedded form, add the default values in the other form. But instead of using entry=pass_entry, include entry=emb_entry.
      Duplicate Embed Field
  5. Now when you click the "Duplicate" button or link, you will be taken to the form with the fields automatically populated with the entry's data. Please note that it is not currently an option to automatically populate multiple rows in a Repeatable Section.

Organize View by a field

There may be times you want to display entry data by a category, such as States, shown in the example below:

    Florida

  • Jacksonville
  • Miami
    Tennessee

  • Memphis
  • Nashville

Follow the instructions below to categorize information in your View by a specific field in your form.

  1. Create a View for your form - this will be the View for the Cities in the example above. Set it to display All Entries and add any content you would like.
  2. In the Content section, add a filter that sets the header field (State field in this example) equal to [get param="header"]. You can change 'header' to any text you would like.
    Organize View by Field
  3. Create a second View for your form - this will be the View for the States in the example above. Set it to display All Entries. Add something like this to the Content:

    [y]
    [display-frm-data id=x header="[y]"]

    Replace x with the ID of the View created in step 1. Replace y with the ID of your header field (the State field in this example).

  4. In the Content section, add a filter that says "State is unique" so it only shows each State one time.
    Organize View by Unique State
  5. Publish the second View on a page. When you visit that page, you should see entries displayed categorically.

Organize View by a Dynamic field

If you have a form (Form B) that includes a Dynamic field pulling entries from Form A, you can create a nested View setup to display entries categorically, with the Dynamic field as the category. Follow the instructions below to categorize entries in your View by a Dynamic field in your form.

  1. Create a View for the form (Form B) that contains the Dynamic field. Set it to display All Entries and add any content you would like.
  2. In the Content section, add a filter that sets your Dynamic field equal to [get param=data_id].
    Organize View by Dynamic Field
  3. Create a View for the form that your Dynamic field pulls entries from (Form A). Set it to display All Entries.
  4. Add something like this to the Content:

    [x]
    [display-frm-data id=y data_id=[id]]

    Replace x with the ID of a field in Form A. Replace y with the ID of the View created in step 1. Leave [id] as is. This will dynamically generate the entry ID.

  5. Publish the second View on a page. When you visit that page, you should see entries displayed categorically, with the Dynamic field as the category.

Filtering Entries

It can be helpful to filter Views based on parameters in the URL, the current user, date ranges, etc. Find more information on filtering entries.

Link child entry to parent

If the (child) form includes a dynamic field to select the (parent) entry, this will link the child entry to the parent entry. There are different ways to set this up.

  • Include the child form on a page that shows the parent entry with the comment system.
  • Click on a parent entry link to pre-select the parent entry in the child form by linking to a View from another View.
  • Set the dynamic dropdown field to get entries from the parent form, and select the entry to link up.

Show form based on another form

You may want to conditionally show a form only if an entry has been submitted on another form. An example of this use case is when you want to verify the email address first before the main form is accessible to the user. Follow the instructions below to conditionally show Form B if the email address has been verified in Form A.

  1. Create Form A with an email address field, and publish the form on a page.
  2. Create Form B and add some content to it. It would only be visible to users who verified their email addresses through Form A.
  3. Create a single entry View with entries from Form A.
  4. In the Listing Page Content box, insert the [formidable id=x] shortcode for Form B.
    Views - Conditionally Show Form
  5. Set up the View filters such as:
    • Entry key is equal to [get param=pass_entry default=1]
    • Email is equal to [get param=email default=1]
    • Add default=1 to the filters. If the URL is tampered with, that filter will not be ignored.

    Views - Conditionally Show Form Filter

  6. In the No Entries message box, insert the shortcode for Form A or a link to the published form.
    Views - Conditionally Show Form No Entries
  7. Go to your Form A Settings → Actions & Notifications → Send Email form action. In the email message, add a verification link in the email message by adding something like:
    <a href="http://examplesite.com/verified?pass_entry=[key]&email=[2677]">verify email address by clicking here</a>

    Replace 2677 with the ID of your email address field.
    Views - Conditionally Show Form Email

  8. Publish the View on a page. The View will look for a match between the data in the URL and an entry in Form A. The View content, with the Form B shortcode, will only be visible if both the Entry Key and Email Address match an entry in Form A. When it finds a match, Form B will be displayed.

Create a unique View URL

You may want to create a unique View for users who are not logged-in to your site. To set this up, you could have a View that uses the entered email address in a new form to create a link to show the associated entry in your main form. The link is sent to the email specified in the form, so only the person with access to that email will be able to see the data from the entry.

  1. If you haven't yet, create a View and call it Main Entry View. It is where you will display all the data you want to show to your user.
  2. In the View Builder, add a filter that says:
    Entry key is equal to [get param=pass_entry default="not a valid key"].
    Views - Unique Main Entry View Filter
  3. Publish the Main Entry View.
  4. Create another View and set it up as a Single Entry View.
  5. In the View Builder, add a filter that says:
    Email field is equal to [get param=pass_email default=none].
    Views - Unique Single Entry View Filter
  6. In the Content section, insert a link to the Main Entry View and add [key] at the end as a param. e.g. yoursite.com/main-entry-view/?pass_entry=[key]
    Views - Unique Single Entry View Content
  7. Publish your Single Entry View.
  8. Create a form with an email address field.
  9. Go to your form Settings → General, and set up the form to not store submitted entries.
  10. Add an email notification. Include the link to the Single Entry View and add the email ID at the end of the param. e.g. yoursite.com/single-entry-view/?pass_email=[100]. Where 100 is the ID or key of the Email field in this new form.

Canonical URL

Canonical URLs are filtered for Views to make sharing easier for detail pages and pages with get param filters. It only applies to the URLs of Views, not the pages where a View is nested. Read more about canonical URLs.

When a View is nested in a page, some sharing tools will link to the View listing page rather than the active detail page or URL with where filters. Some sharing tools (including Facebook and the Safari share option on iOS) would always share the URL of the listing page instead without filters.

If you need to filter the canonical URL for a specific View on a target page, use the get_canonical_url hook.

Related Videos

  • Job board course: Create a nested view
  • Set up a nested View
  • Link to a View from another View
  • Duplicate Entries on the Front End
  • Organize View by a field
  • Organize View by a Dynamic field
  • Filtering Entries
  • Link child entry to parent
  • Show form based on another form
  • Create a unique View URL
  • Canonical URL
  • Related Videos
Categories
×

Categories

  • Installation & Getting Started
  • Account Management
  • Forms
  • Entries
  • Views
  • Styles
  • Importing & Exporting
  • Add-Ons
  • Extend Formidable Forms

Using WordPress and want to get Formidable Forms for free?

Get Formidable Forms Lite Now

You do not have permission to view this form.

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

Take on bigger projects Right Now

Get the tools you need to revolutionize your workflow and architect a masterpiece. Build the most advanced WordPress forms and actually use the data you collect in meaningful ways.

Get the most advanced WordPress form plugin and the only form builder with integrated Views.

Get Formidable Forms Now

Resources

  • Community
  • Affiliates
  • Contact
  • Free Online Form Builder

Top Features

  • Application Builder
  • Calculator Forms
  • Surveys & Polls
  • Quiz Maker
  • Form Templates
  • Application Templates
  • Directories
  • Donation Plugin

Company

  • About Us
  • Giving Back
  • Careers
  • Newsletter
  • WP Tasty
  • Nutrifox

Copyright © 2023 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.
Privacy Policy | Terms of Service | Sitemap

Join 300,000+ using Formidable Forms to create form-focused solutions fast. Get Started See User Reviews