BloggingHow toWhy What HowWordpress

How to Capture Email before Downloading a File in a post on WordPress

Email before download

Check out the Updated post: [UPDATED] – How to Capture Email before Downloading a File in WordPress

You might have come across many sites over internet which asks you to put in your email and take a file ( like PDF ) in return. If you ever wondered how this can be done on WordPress site then follow these steps.

What all you’ll need:

To get this done you will need 3 WordPress plugins:

  1. Email before Download
  2. Contact Form 7
  3. WordPress Download Monitor

Lets Start:

  1. Install all the three plugins I mentioned above on your WordPress instance.
  2. Go to Email before Download plugin settings ( http://example.com/wp-admin/options-general.php?page=email-before-download ) and setup  Delivery Format, Hide/Mask Real Link, Link Expiration Time values as per your requirement and hit ‘Save Changes’.
Email Before Download
Email Before Download

3. Now navigate to Contact Form 7 settings and create a contact form ( on left menu Contact > Add New ).

Contact Form
Contact Form

READ: How to get an attractive image for your Blog Post ?

4. Give a title to your form, remove unwanted fields ( highlighted here, else if you wish you can keep them as well ) from the form and Save.

Form Creation
Form Creation

5. Once you save the form, make note of the form ID, we’ll use it later ( here it was 825 ).

Form Created
Form Created

6. Now go to Download Monitor and add the file which your readers will download ( On left menu Download > Add New ).

Add File

7. Give a title to Download ( this will be shown to your readers once they fill up the form and submit ).

Add File Page
Add File Page

Don’t forget to make a note of the File ID as well, highlighted in the picture above.

READ: Make your Menu look awesome with ‘Menu Image’.

8. Add the file using file Downloadable Files/ Versions section

9. Hit Publish.

10. Now create a Page/Post, wherever you want to keep your file at and insert following code in it.

Code
Code

Where X will be the file id ( for me it was 850, can vary for you ) and Y will be Contact Form ID ( for me it was 825, may vary for you ).

11. Save and Publish the Page/Post.

Here is a sample which I created as a demo.

Do let us know your thoughts in comments section below.

Comments (11)

  1. Avatar

    Hi Abhi,
    Does this solution still work? I tried to look for the Email Before Download plugin but I couldn’t find it. Thanks.

    • Avatar

      Hello Mattyps,

      Thanks for your message, yes the plugin is no longer available on WordPress directory. An alternative solution can be using ‘Gravity forms’ and provide link to file in submit confirmation message.

      Regards,
      Abhi

  2. Avatar

    Hi, I found your post through google search. Thank for the brilliant tutorial that solved my problem half way. The reason is because after I pressed the submit button, I keep seeing ajax spinner spinning, and also received an email notification about someone is interested on downloading my file. But I don’t see the link showing up… May I know what could be the problem? Thank you.

    • Avatar

      Hello Julie,

      Please try to check Contact form configs, or use ‘WP-Mail-SMTP’ for any issues around Contact form 7.

      Regards,
      Abhi

  3. Avatar

    The Email before Download plugin doesn’t exist any more 🙁

    • Avatar

      Hello Julie,

      Thanks for pointing out this, yes the plugin is no longer available on WordPress directory. An alternative solution can be using ‘Gravity forms’ and provide link to file in submit confirmation message.

      Regards,
      Abhi

  4. Avatar

    Please provide URL/link for ‘Gravity forms’. Thank you!

  5. Avatar

    How about a solution for non-Wordpress sites?

  6. Avatar

    EBD is still available and works. But, when you load the plugin you don’t get the EBD plugin settings in the WP Dashboard menu. It’s a bear to figure out all the configurations

Excited to hear from you, comment below !