Formidable Forms

Formidable Forms

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

How to offer a protected file and download file on submit

Last Updated: February 17, 2022

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 through file-sharing 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 and name it Protected Files.
  2. Add a Single Line Text field and name it File Name. Set this field to be required and unique.
    Protect File Upload - Single Line Text
  3. Add a File Upload field. Click the Update button to save the form.
    Protect File Upload - download file on submit Form
  4. Go to your form Settings → Form Permissions page and select the Protect all files uploaded in this form checkbox.
    Protect File Upload - File Permissions
  5. Click the Update button to save the form settings.

Step 2: Create a View to Display the Protected Files

  1. Create a new View and name it Display Protected File.
    Protect File Upload - View Settings
  2. In the Advanced Settings, set the limit to 1 to display a Single Entry.
  3. In the Listing Page Content Box, select the Text tab and enter the following HTML:
     <a href="[28490]">Open [28489]</a>

    Protect File Upload - View Content

    • Replace 28490 with the File Upload field ID.
    • Replace 28489 with the File Name field ID.
  4. Add a filter to the Advanced Settings of the View:
    • File Name equal to [get param=filename default=0]

    Protect File Upload - View Advanced Settings

  5. Save the View by clicking the Update button.

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. Set the Form to Show a Message on submit.
    Protect File Upload - Show Message
  3. Insert the View shortcode in the Messages → On Submit box.
    [display-frm-data id=6682 filename="Test File" filter=limited]

    Protect File Upload - Display Download File

    • Replace 6682 with the ID of your View.
    • Replace the Test File with the file name you have submitted in the form. Note: The entry's filename should match the submitted entry, or the download link will not be displayed.
  4. Finally, update your form, and you are done!

Protect File Upload - Workflow

?  Read more: How to Require Email to Download Files in WordPress
  • 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

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