Jump to content

Recommended Posts

Posted

Hello everyone,

I’m happy to share a new module I’ve been working on: WireMagnet.

We often face the requirement to offer "gated content" (like Whitepapers, PDFs, or Zip files) where users need to provide their email address to receive a download link. While there are external services for this, I wanted a native, privacy-friendly, and lightweight ProcessWire solution.

What does WireMagnet do? WireMagnet handles the entire flow of capturing leads and delivering files securely. It intercepts form submissions, logs the lead, and sends an email with a unique, temporary download token. It prevents direct access to the files (assets are not just sitting in a public folder).

Key Features:

  • Secure Delivery: Generates unique download tokens (valid for 24 hours) and serves files via wireSendFile().

  • Double Opt-In (DOI): Optional support for DOI to verify email addresses before sending the file.

  • Automated Emails: Automatically sends the download link (or attaches the file directly if preferred).

  • AJAX Ready: Comes with built-in Alpine.js support for seamless, reload-free form submissions.

  • Lead Management: Logs all subscribers (Email, IP, Timestamp) to a custom database table (leads_archive).

  • Admin Interface: View leads and export them to CSV directly from the ProcessWire backend.

  • Easy Integration: Render the form with a single line of code.

How to use:

  1. Install the module.

  2. Create a page (e.g., using a lead-magnet template) and upload your file to a file field.

  3. Output the form in your template:

// Render the subscription form (default field: 'lead_file')
// The module automatically handles success/error messages and styling.
echo $modules->get('WireMagnet')->renderForm($page);

// OR: Render for a specific field (e.g., if you have multiple magnets or custom field names)
echo $modules->get('WireMagnet')->renderForm($page, 'my_custom_file_field');

// OR: Override the button text manually
echo $modules->get('WireMagnet')->renderForm($page, 'lead_file', 'Send me the PDF!');

Configuration: You can configure the sender address, email subject, DOI settings, and styling preferences (like button text) in the module settings.

Download & Source:

I'm looking forward to your feedback and suggestions!

Cheers, Markus

  • Like 8
  • Thanks 3

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...