Contact Form 7 is a fantastic free plugin for adding contact forms to a WordPress site. But despite its ease of use and reliability, it’s missing a lot of features out-of-the-box.
I recently showed how you can style Contact Form 7 with the help of plugins. In this post, I’ll show you how to extend Contact Form 7 even further to do the following:
- Add conditional logic to your form
- Add dynamic values to your form fields
- Save contact form submissions to the WordPress database
- Send out a PDF generated from your form
- Protect your form from spammers
- Sell simple products without an eCommerce solution
All the plugins mentioned throughout this post are free to download from WordPress.org.
Let’s get started.
Tip: if you’re a WPMU DEV member, you can use our very own Forminator plugin as an alternative to Contact Form 7.
7 Useful Plugins for Adding Features to Contact Form 7
- Contact Form 7 Conditional Fields
- HubSpot
- Redirection for Contact Form 7
- Contact Form Submissions
- Send PDF for Contact Form 7
- Contact Form 7 Honeypot
- Contact Form 7 – PayPal Add-on
1. Contact Form 7 Conditional Fields
Contact Form 7 Conditional Fields brings conditional logic to your contact form. Form fields can be set to appear only when the user has given a particular response.
For this example, I created a question for a company contact form that collects some useful marketing information by asking the user how they heard about the company.
There are 5 options for that question:
- Word of mouth
- Search engine
- Social media
- Other
These options are added as radio buttons. My radio button group was named where
.
When the “Other” option is chosen, it should show a text field for the visitor to add the other method that they discovered us. I named this text field where-other
.
But this field should only show if the Other option is selected, so it’s wrapped in a conditional field group which uses the shortcode [group other][/group]
. My conditional field group is called other-input
.
To set the display condition go to Conditional fields and create a rule.
Here is the final contact form code for the radio button group and text field:
The form will now only show the option to add an additional response when Other is selected.

[…]
This article was written by James Farmer and originally published on WPMU DEV Blog.