Formidable Forms

The Most Advanced WordPress Forms Plugin and Form Builder

  • Features
  • Pricing
  • Blog
  • Support
  • Login
  • Get Formidable Forms

How to offer a protected file and download file on submit

Last Updated: May 8, 2020

Knowledge Base → Views → Examples → How to offer a protected file and download file on submit

Use Formidable Forms Pro to protect your gated content file downloads and offer a download file on submit. Gated content is content that can only be accessed by users who submit your form. This ensures that only people who have paid for the content (via your form) or submitted the required form to access the content (such as a lead generation form) can access the content. Formidable will protect your content so it can't be illicitly shared with others.

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

Step 1: Create a Form to Protect the Files

  1. Create a new Form; name it "Protected Files."
  2. Next, add two fields; the first will be Single Line Text field and name it File Name. Now, make this field required and unique.
    Protect File Upload - Single Line Text
  3. Second, add a File Upload field.
    Protect File Upload - File Upload
  4. Next, click Create to save the form. When the form settings load, check the box that says Protect all files uploaded in this form. Lastly, click Update to save the form settings.
    Protect File Upload - download file on submit Form

Step 2: Create a View to Display the Protected Files

  1. Create a new View; name it "Display Protected File."Protect File Upload - View Settings
  2. Next, set the View Basic Settings to show a Single Entry.
  3. In the Content Box, enter the following HTML, where [28490] is the Field ID of the File Upload field, and [28489] is the Field ID of the File Name field:
     <a href="[28490]">Open [28489]</a>
  4. Now, add a filter to the Advanced Settings of the View that says:
    • File Name equal to [get param=filename default=0]

    Protect File Upload - View Advanced Settings

  5. Next, save the View.

Step 3: Display the download file after form submission

  1. Go to your existing form, or create a new one. Once in the form, go to the Form Settings.
  2. Now, set the Form to Show a Message on submit.
    Protect File Upload - Show Message
  3. Display the View in the form success message. The View shortcode should look like this:
    Protect File Upload - Display Download File

    [display-frm-data id=6682 filename="Test File"]
    • 6682 is the ID of your View
    • Test File is the name you put in the File Name field when you submitted the form, and
  4. Finally, update your form and you are done!

Protect File Upload - Workflow

  • Step 1: Create a Form to Protect the Files
  • Step 2: Create a View to Display the Protected Files
  • Step 3: Display the download file after form submission
Categories
×

Categories

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

Using WordPress and want to get Formidable Forms for free?

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

  • Front End Editor
  • Repeating Fields
  • Views from Entries
  • Calculator Forms
  • Conditional Logic
  • Visual Form Styler
  • Form Templates
  • User Submitted Posts
  • File Upload Forms
  • Spam Protection
  • Multi Page Forms
  • Surveys & Polls
  • Form Graphs & Charts
  • Save and Continue
  • Mobile Forms
  • Stripe Forms
  • PayPal Forms
  • WooCommerce Forms
  • MailChimp Forms
  • User Registration
  • Signature Forms
  • Bootstrap Forms
  • Quiz Maker
  • Zapier Forms
  • Salesforce Forms
  • HubSpot Forms
  • API Webhooks
  • Multilingual Forms
  • Directories

Company

  • About Us
  • Giving Back
  • Careers
  • Newsletter
  • Blog

Copyright © 2021 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