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.
3. Click with your mouse cursor at the beginning of the text and then click the acceptance button.
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
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.
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.
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:
Now you can go and see how is your consent checkbox looking like on your contact form.
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!
Thanks for this, it is a great help. Do you know why I am getting the checkbox above the text as opposed to being beside it as in your example?
Hello! Glad you found the post helpful! That happens because of some CSS issues. It’s probably a conflict between your theme and Contact Form 7.
How did you get around this?
Did you properly close the link tag? In the images, I forgot to add an extra “ at the end, but I’ve added it in the text code. I’ll replace it in the images too.
If you did properly close the tag, it might mean that the theme intervenes in some way, making the whole text a link. I haven’t done anything special to prevent this, it works fine as is.
hey! any ideea how to show a error when consent is not checked? Like “You must accept bla bla before sending”.
Heya! Yep, I’ve updated the post and showed how to do that. Check it out!
Hi! I would like to send to visitor a copy of acceptance. Unfortunately when he gets an emial, acceptance text is not formatted ( it’s just plain tekst ). Any idea how to make it nice?
Second question is how to translate word “consent” to a different word when I send acceptance content in an email? For example I wolud like to have “You accepted this terms : …”
Hello! I’m not exactly sure how are you doing that… I haven’t seen a setting in Contact Form 7 that sends emails with acceptance copies to visitors. If you could provide more details, perhaps I could help.
Hi! Great post, very helpfull. I’m not sure which tag to use in the email message. [acceptance consent-checkbox] doesn’t get any value in the email send by CP7.
Hello and thank you!
Hope I understood your issue correctly. Add the tag into the Mail tab/section, where the other tags are (e.g. [your-name], [your-subject]). Once you add the tag there, the word Consented (followed by the consent message) will appear in the email.
The tag that’s in the Form section must match the one in the Mail section.