In my other articles, I’ve shown you how to add a consent/privacy policy checkbox in your WooCommerce checkout page and a privacy checkbox in Avada’s contact form, to comply with the GDPR rules.

In this post, I’ll show you how to add a consent checkbox in Contact Form 7, since you need to add one for contact forms as well.

This will be pretty easy, since Contact Form 7 has already implemented such a feature.

How to add a consent checkbox in Contact Form 7

In order to add a consent checkbox in Contact Form 7, you have to:

1. Go to Contact -> Contact Forms and select the contact form that you want to edit.

2. Add whatever privacy text you see fit.

Example: “I understand that this form collects my name and email so I can be contacted. For more information, please check our <a href=”https://example.com/privacy/”>privacy policy</a>.

3. Click with your mouse cursor at the beginning of the text and then click the acceptance button.

add consent checkbox in contact form 7

4. A pop-up box will appear with some options, which you can leave as is.

You could change the name, though, if you wish, with something more “friendly”, like consent-checkbox.

acceptance tag generator contact form 7

Don’t select the Make this checkbox checked by default option, since it’s against the GDPR rules. You have to let the users give their consent by checking the box.

5. Click the Insert Tag button.

6. After inserting the tag, it will appear at the beginning of the text.

acceptance tag contact form 7

7. This is important! Unlike other Contact Form 7 tags, the [acceptance] tag has to be closed! You can do that by adding [/acceptance] at the very end of the text.

close acceptance tag contact form 7

Note that the [acceptance] tag will be required by default!

Adding an error message

If users try to send a message without checking the consent checkbox, no error will appear. Nothing will happen when pressing the submit button. This is a default setting.

If you want an error to display when users try to send a message without checking the box, then you have to add the following code in the Additional Settings tab: acceptance_as_validation: on

consent checkbox error validation contact form 7

That’s it!

Now you can go and see how is your consent checkbox looking like on your contact form.

contact form 7 consent checkbox

That’s a wrap

Hope you liked the post and understood how to add a consent checkbox in Contact Form 7!

If you have any questions or thoughts, drop a comment, contact us or message us on Facebook.

You can also follow us on Twitter and subscribe to our YouTube channel.

If you want to start your own WordPress blog, or need a website for your business, our WordPress installation and customization service is at your disposal! We also provide WordPress support and maintenance!

You can also purchase a ready-made WordPress website with hosting and support included!