timvermaercke / craft-whitepapers
Let users download gated files only after they drop their email address
Package info
github.com/timvermaercke/craft-whitepapers
Type:craft-plugin
pkg:composer/timvermaercke/craft-whitepapers
Requires
- php: >=8.2
- craftcms/cms: ^5.0.0
This package is auto-updated.
Last update: 2026-07-24 08:38:45 UTC
README
Let your users download whitepapers (or other files), but not before leaving their email address.
The plugin also provides a Field Type, to link a whitepaper to an entry and it provides CSV exports per whitepaper as well!
Screenshots
Frontend (example implementation)
The above is an example of an implementation of this plugin
Admin
Overview
Detail
Requirements
This plugin requires Craft CMS 5.0.0 or later, and PHP 8.2 or later.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project -
Then tell Composer to load the plugin:
composer require timvermaercke/craft-whitepapers -
In the Control Panel, go to Settings → Plugins and click the “Install” button for Whitepapers.
Brought to you by Tim Vermaercke
How to use
Create a Whitepaper object in /admin/whitepapers first.
Then you can add the following snippet to your templates:
<form action="{{ actionUrl('whitepapers/public/download-whitepaper') }}" method="post"> {{ csrfInput() }} {{ hiddenInput('whitepaperId', 1) }} <label for="email">Email</label> <input type="email" id="email" name="email" /> <input type="submit" value="Download" /> </form>
You can also create a field in Craft and use the custom field "Whitepaper", eg. in a Globals Set:
Create a field:
Create a globals set
Fill out the globals set:
Use the value in your templates:
{# will output the selected whitepaper id #} {{ settings.fieldWhitepaper }}






