How To Add Link in Contact Form 7 Checkbox

In this tutorial I will show you how to add a link in a contact form 7 checbox. Now we need more than ever to add links in checkboxes due to new GDPR rules because the user must agree with our terms and conditions and we need to have the proof they accepted them. 

If you are using contact form 7 you probably already tried to add links in the standard checkbox offered by the contact form 7 plugin, you have noticed that you are not allowed. Whne you insert HTML in the checkbox everything mess up. In this case you will have to choose for the acceptance field, with this fields you will be able to add how many links you need in your checkbox. The acceptance field works almost like checkbox but this field has some extra features. Normally this field is working a little different as normal checkbox do, I mean the validation for this field will run after the whole form was validated but we can deal with that adding the following line of code in Additional Settings tab. 

Open up your contact form and add a new acceptance field, after you set up the field as you wish go to the Additional Settings tab and add the following line of code:

acceptance_as_validation: on

Now this acceptance will work without any problems, and you will be able to add how many links you need in your contact form 7 checkbox. Let me know if you need help in the comments section.

 

0 0 votes
Article Rating
Subscribe
Notify of
guest
5 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Chloe
Chloe
5 years ago

Hi,

Thanks for your advice. I tried to do this on my website but it doesnot work unfortunately.
This is what I have now:

Checkbox –> I HAVE READ AND ACCEPTED THE PRIVACY POLICY.

Under the words Privacy Policy appears a link (I mean it had a line under it) but when I click on that link nothing happens and I’m really sure I used the right webaddres.

Please help me out 🙂

Chloe ter Bogt
Chloe ter Bogt
5 years ago
Reply to  Penguin Arts

I have done it like this

Your Name (required)
[text* your-name]

Your E-mail (required)
[email* your-email]

Subject
[text your-subject]

Your Message
[textarea your-message]

[checkbox* privacy-policy-agree “I have read and accepted the Privacy Policy.”]

[submit “Send”]

Albert
Albert
3 years ago

Thanks for the post, was very helpful. I just have one problem, when I test my form and fill all the information but don’t tick the acceptance checkbox I get the “validation error” I set for whenever the user has not given information on a required field instead of the “there are terms the user must accept” message I have which is “You must accept the terms and conditions before sending your message.”.

Am I missing something else?

5
0
Would love your thoughts, please comment.x
()
x