12% off of LTD using this coupon: TWELVEPERCENTOFF. Promo ends on 2 Dec midnight UTC.
Published on Jul 22, 2021

Initiating File Download After Gravity Forms Form Submission

Sridhar Katakam

This members-only tutorial provides the steps to have the post-specific file to begin downloading after a Gravity Forms form has been filled and submitted. We shall use Meta Box to set up post-specific File Input field and have the form inside Oxygen's Modal.

Step 1 - The Form

Create your Gravity Forms form.

Change the Default Confirmation type to Redirect and set any redirect URL (could be your site's homepage or even https://google.com - it doesn't matter).

Here is an export of the form from my test site for your reference. Mirror.

Step 2 - CPT and Custom Field

In my test site I registered a CPT called download using Meta Box AIO, then a field group attached to it having a File Input type of field with the ID of file_input_i4wa4evst5. This is for setting post-specific file that the visitors can download.

You can of course implement this tutorial for any post type incl. the built-in post and/or page.

Also, a different plugin like ACF can be used for registering the custom field.

Step 3 - Populate the Field

Edit your posts (or CPT entries) and select file for each.

Step 4 - Filter to set up file download

Install and activate Code Snippets plugin.

Go to Snippets > Add New.

Title: GF Redirect

Code:

This is a premium members-only content.

To view the rest of the content, please sign up for membership ($47/month or $599 one-time).

Already a member? Log in below or here.

tagschevron-leftchevron-rightchainangle-rightangle-upangle-downfolder-ocalendar-check-omagnifiercrossmenuchevron-downarrow-right