Do you want to give your visitors a PDF file instantly after they submit your Contact Form 7 form? Maybe it’s a brochure, catalog, eBook, or price list.
In this guide, I’ll show you how to:
✅ Automatically download a PDF after form submission
✅ Redirect the user to a custom Thank You page
✅ Keep it simple with just a few lines of code
🛠Step 1: Upload Your PDF
-
Go to WordPress Dashboard → Media → Add New
-
Upload your PDF file
-
Copy the File URL (you’ll need this for the code)
🛠Step 2: Create a Thank You Page
-
Go to Pages → Add New
-
Name it “Thank You” (or any title you want)
-
Add your message (e.g., “Thanks for contacting us! Check your email for more details.”)
-
Publish the page and copy its URL
🛠Step 3: Add JavaScript Code
Now we’ll add a small script to trigger the PDF download and redirect.
📌 Replace:
-
https://yourdomain.com/wp-content/uploads/yourfile.pdf→ with your actual PDF URL -
https://yourdomain.com/thank-you→ with your Thank You page URL
🛠Step 4: Where to Add the Code
You can add the script in two ways:
-
Option 1 (Recommended): Use the Code Snippets plugin → Create a new snippet → Insert into Footer.
-
Option 2: Edit your theme’s footer.php → Paste code before
</body>.
🎯 Final Result
Now when a visitor submits your Contact Form 7 form:
-
The PDF will automatically download
-
The user will be redirected to your Thank You page
This is a great way to deliver lead magnets, brochures, or eBooks instantly and also track conversions on your Thank You page.
✅ Bonus Tip: Apply to Specific Form Only
If you have multiple forms and want this feature on just one form, you can target it by Form ID. Example:
👉 To find your form ID: Go to Contact → Contact Forms in WordPress, and you’ll see the ID next to your form name.
🎉 Conclusion
With this method, you can easily make Contact Form 7 download a PDF instantly and send visitors to a Thank You page. It’s perfect for businesses that want to share catalogs, eBooks, or guides automatically after form submission.
.jpg)
Comments
Post a Comment