We assume that you already have basic knowledge of our private download links as well as how to set up a form by Gravity Forms.
- Gravity Forms version 2.4.17 and greater
- Prevent Direct Access Gold version 18.104.22.168 and greater
To grant user access to protected files after Gravity Forms submission, simply follow 4 steps below:
- Protect your private file with PDA Gold and get its id
- Create pda_private_link shortcode for your protected file
- Create a submit form with Gravity Forms plugin
- Insert shortcode to Confirmation or Notification Email
Step 1: Protect your private file and get its id
When clicking on the file thumbnail under Media Library Grid View, you will see Prevent Direct Access Gold section which allows you to protect the file and set its access permission.
Navigate to the browser’s address bar to get the id of your protected file (the number after “?item=”)
Step 2: Create pda_private_link shortcode
After customizing our pda_private_link shortcode with the file_id you’ve got from the above step, you will get one like this:
[pda_private_link file_id=357 download_limit=1 download_expiry=1]
This private download link will expire after either one click or one minute whichever comes first.
Step 3: Create a submit form
After activating Gravity Forms successfully, navigate to Forms menu in your Admin Dashboard and set up a form as instructed.
In this example, we ask visitors to enter their names and emails to get the free ebook.
Step 4: Insert shortcode
There are two ways to send private download links to submitted-form people.
The first one is to add pda_private_link shortcode to Confirmation, which users will see after submission.
The other is to add pda_private_link shortcode to Notification Email. Instead of providing the download link in Confirmation Screen, we will send it to the submitted email address.
The last step is to add this form to your post and publish it.
When a visitor submits your form successfully, he or she will receive a message as image below:
At the same time, an email including the private download link will be sent to their inbox.