Email Lock

The Email Lock extension for Download Monitor allows you to require users to enter their email address before they gain access to a download.

Installation

  • Unzip and upload the plugin’s folder to your /wp-content/plugins/ directory
  • Activate the extension through the ‘Plugins’ menu in WordPress

For more information on installing and managing plugins see here

Usage

After installing the extension head over to the download you wish to lock with an email address form.

Lock the download

Edit the download you wish to lock and check the 'Email Lock' checkbox in the 'Download Options' meta box. Don't forget to save/update the download after you've checked the option.

Locking you download
Locking you download

Insert the unlock download form shortcode

The Email Lock extension comes with a new shortcode that will display the Email Lock form and will display a download link to the file after the form has been successfully. You need to pass your download ID to this shortcode, we used download ID 5 in our example.

Example: [dlm_email_lock id=5]

Unlocking via the No Access page

Instead of displaying the unlock form on your page you can also display the default download link by using the [download] shortcode. When the visitor clicks the link, Download Monitor will check if the user has already unlocked the download. If they didn't yet, a No Access page will be displayed. The Email Lock extension automatically appends the unlocking form to the No Access page so your visitor can unlock the download there.

Example: [download id=5]

Because you use the default [download] shortcode, you can use all of the shortcode's attributes like output templates!

Managing entered email address

Entered email addresses are attached to the download. A new meta box called 'Email Addresses' will be attached to each download that is locked with the Email Lock extension. In this list you can remove email address and export them all to a CSV file. You can then import that CSV file in your mail client of choice.

You can manage the email address at the download edit screen
You can manage the email address at the download edit screen

Customer Usage

If you've followed above steps in the Usage section your download is ready to go. Visitors will be have to enter their email address prior gaining access to the download.

Example display of an email lock
Example display of an email lock

FAQ

Is the email address validated?

Yes, it is. The email address is validated by the browser (when supported) because it's a native HTML5 email field. On top of that the email address is validated with JavaScript client-side and with PHP server-side.

Will mobile devices show the correct keyboard with the generated Email Lock form?

It will. The Email Lock extension generates a native HTML5 email field enabling mobile devices to display the correct keyboard.

I want to change the HTML structure of the generated form, is this possible?

It is. We realize that even when for most people the default HTML structure is great, you might want to have your custom template.

To overwrite the Email Lock template part add a file named download-email-lock.php to your-theme/download-monitor/. You can find (and use) the default Email Lock template located in plugins/dlm-email-lock/templates/download-email-lock.php.

Please note that if the required form field are not submitted the extension can't give your visitors access to the download.

Was this article helpful? Yes · No