Submitted by Chris McIntosh on October 15, 2015

One of the most useful tools for building inbound leads and engaging with potential customers is the Capture form.  This is a simple utility that is used in order to get a customer to provide details about themselves in exchange for a download of some sort.  The download could be a PDF, an application, or image.  Regardless of what it is this can be accomplished pretty easily using Drupal 7's Webform module and the Webform Protected Downloads module.

Many people are familiar with how easy the Webform makes it create online forms that can be filled out by visitors.  It has been used for contact and captures forms for some time.  With the addition of the Webform Protected Downloads module, you can also provide a method to let users download protected files.  The setup is relatively simple.  You will need to add a file field onto your Webform content type, or create a new webform enabled content type specifically for the capture form.

Image removed.
You will want to configure your Drupal site to allow Private File uploads, the private file folder should be somewhere on the server that is accessible to Drupal, but not to the public web.  This allows Drupal to store the files in a location that can not easily be accessed by anyone on the internet without first filling out your webform.

This sort of configuration is also useful for websites looking to sell digital products through Commerce or Ubercart.  As it ensures that your products and digital assets are protected from access over the internet.

The next step to setting up the protected download form is to create a new webform, add the fields you are interested in capturing using the webform wizard.  Once you have done that and uploaded your file, you will want to continue to the Protected Downloads tab and make sure that everything is in place for users to download your file.

There are a couple of checks to make sure that everything is ordered for your form, and once you get green checks next to the three tasks then your form is ready to collect information and allow users to download the file.  This can be really useful in conjunction with something like Webform2Sugar which connects a webform to a SugarCRM in order to collect leads that fill out the form.