Docs & Support

Learn about all the Formidable features and get support from our amazing customer success team.

ViewsView Examples
How to Add a Contact Form to a View

How to Add a Contact Form to a View

Add a contact form to each listing's detail page so visitors can email the person who submitted that listing. This works well for business directories, real estate listings, job boards, and other sites where each entry belongs to someone.

You only need one contact form for all of your listings, and the listing owner's email address is never shown on the page.

How it works

In this example, we'll use a business directory with 2 forms:

  • Business Listing (Form A): Businesses submit their listing with this form. It includes a Business Name field and an Email field with the ID 50.
  • Contact Business (Form B): Visitors use this form to send a message to a business. It includes a Dynamic field with the ID 100 that holds the listing.

When a visitor opens a listing, the detail page URL includes that listing's entry ID. For example: example.com/directory/entry/1309/.

The Dynamic field in the Contact Business form saves that ID (1309). When the form is submitted, the email action uses the Dynamic field to get the business's email address from the listing and sends the message there.

Your field IDs will be different. Replace 50 and 100 with the IDs from your own forms.

Formidable Forms makes advanced site building simple. Launch forms, directories, dashboards, and custom WordPress apps faster than ever before.

Before you begin

  • You'll need Formidable Forms Pro with a Plus license or above.
  • Create the Business Listing form (Form A) with a Business Name field and an Email field for the business's email address.
  • Create a View for Form A (View A) with a detail page and a link from the listing page to the detail page.
  • Open View A's Advanced Settings. Both detail page settings appear there once View A has detail page content. Note the text in the Detail Page Slug box. This example uses entry. Set Detail Page Key to ID, because the Dynamic field saves the listing's entry ID.

Create the contact form

  1. Create the Contact Business form (Form B) with the fields you want visitors to fill out. For example, Name, Email, and Message.
  2. Add a Dynamic field to Form B. Learn more about Dynamic fields.
  3. In the Dynamic field's options, set Load Options From to Form Entries. Then choose Form A in Select a Form. In the dropdown that appears next to it, choose the Business Name field.
  4. Open the Advanced section and set the Default Value to [get param=entry]. If your Detail Page Slug in View A isn't entry, use your Detail Page Slug instead. For example, [get param=business]. Learn more about getting a parameter from the URL.
  5. In the same section, set Visibility to Administrator. Visitors don't see the field, but the form still saves the listing's entry ID. Administrators see a dropdown with the listing already selected.
  6. Click Update to save your changes.

Form B now saves the listing's entry ID with each message.

Send the email to the listing owner

In Form B, set up an email notification with these settings:

  • To: [100 show=50]
    Replace 100 with the ID of the Dynamic field in Form B. Replace 50 with the ID of the Email field in Form A. This uses the Dynamic field to get the business's email address from its listing.
  • Reply To: The ID of the visitor's Email field in Form B. For example, [102]. When the business replies, the reply goes straight to the visitor.
Don't save the business's email address in a Hidden field. Hidden fields are still in the page source, so bots can collect the address and spam it. With the steps above, the address is looked up on the server when the email is sent, so it never reaches the browser.

Some sites set this up with a Hidden field and [frm-field-value field_id=50 entry=[101]] in the To box. Here, 101 is the ID of the Hidden field that holds the listing's entry ID.

With a Hidden field setup, the email isn't sent for most visitors since Formidable Forms 7.0. The frm-field-value shortcode now gets a value from a listing only for administrators and the user who submitted the listing. For every other visitor, the To box is empty.

To fix a Hidden field setup, switch to the Dynamic field and the To box above. Or add a code snippet to show the Email field's value to every visitor, using the ID of the Email field in Form A. The snippet makes that field's value readable wherever [frm-field-value] gets it from an entry, such as on a page or in a View.

Add the form to the detail page

To add the contact form to a View, put its shortcode on View A's detail page.

  1. Return to View A and open the Detail Page tab.
  2. Click the content box to open the Edit Detail Page Content window. Insert [formidable id=x minimize=1] where you want the contact form to show. Replace x with the ID of Form B. See all form shortcode parameters.
  3. Click Update in the window to keep the content.
  4. Click Update at the top of the page to save View A. Then publish it on a page.

Each listing's detail page now shows the contact form, and each message goes to the business that submitted that listing.

Troubleshooting

If the email doesn't arrive, open the entry in Form B:

  • The Dynamic field is empty: The parameter in [get param=entry] doesn't match the Detail Page Slug in View A. Or View A's Detail Page Key is set to Key instead of ID.
  • The Dynamic field has a value: Check that the To box uses the ID of the Dynamic field in Form B. Also check that show is the ID of the Email field in Form A.

If both look right, see Why isn't my form sending emails?

Was this article helpful? *

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.

In this article

    We have a small, but amazing team of dedicated people who are committed to helping you achieve your goals and project requirements.


    Copyright © 2026 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.

    Complete your purchase
    Don't forget your purchase!
    Complete Purchase
    Join 400,000+ using Formidable Forms to create form-focused solutions fast. Get Formidable Forms