Include privacy policy box in Contact Form 7 – .com

In this tutorial we will see how to include an acceptance box for the privacy policy in forms created with Contact Form 7.

GDPR and CF7 forms

In the previous tutorial we saw how, with the idea of ​​being able to adapt its fields to the General Data Protection Regulation.

For this we had to include a checkbox with a link to our privacy policy, and also a small legal text. We are going to do the same thing today with a form created from the Contact Form 7 plugin.

CF7 is a very popular free plugin that allows you to create basic forms, and that we can download from the . In the following lines we will see the steps to follow to modify our forms.

Add checkbox to our Contact Form 7 form

During the process we will need the link of the page that contains the privacy policy of our site, in order to add it to the label that will accompany our data protection box. So if you haven’t created it yet, it’s a good idea to do so before moving on to the next steps.

Once we have the url, we go to our WordPress desktop, access “Contact/Contact forms”, and click on the “Edit” option of the form that we want to modify to open it in editing mode. What we are going to do is the following:

  • Add the acceptance box of our privacy policy: Thus, users who send us a message will be able to know and accept our terms regarding data protection.
  • Add the legal tag / info text to the first layer: Here we can indicate in a summarized and clear way, the name of the person responsible for the data that is sent through said form, the purpose for which that data is going to be used, or the rights of the users over them.

Well, having seen all this, we can begin. We already have our form open. In the case of the example, it is a form with two fields: the Email field, and the Message field, as well as the submit button.

See also  Elementor course - .com

As we can see, it shows some labels and their corresponding shortcodes. Let’s take into account that each form will show a different code depending on the fields we need and their names.

Contact Form 7 comes standard with a check box specially dedicated to confirming the consent of the sender of the message. When this checkbox is defined as mandatory, the Submit button on the form remains inactive until the checkbox is checked.

The checkbox we are talking about is called “acceptance” / “acceptance”, and we can add its shortcode anywhere we want. As it is usually included just before the Send button, we are going to place the cursor on the line before it, and we will click on the “acceptance” / “acceptance” field that we have just commented on.

Immediately afterwards, a new screen will open with several options to fill in:

  • Name: Name that we will use to refer to the checkbox. It will serve as an identifier for the shortcode of the element.
  • Condition: Here we will indicate the text that will go next to our privacy box.
  • Options: It refers to whether the field will be mandatory or optional.

The other two sections are used to apply styles. In this case we will leave them blank. We would have something like this:

As we can see, we have named the field “Privacy”. It could be called anything we like, but it’s good practice to assign intuitive names. Especially if we have many fields in our forms.

For the “Condition” box we have added a line of text that also contains the link to our privacy policy:

I have read and accept the Privacy Policy.

Watch out here! You have to change the URL that appears in red for the URL of your privacy policy. If the link is not correct, it will not work. So don’t forget to modify it 🙂

See also  Video course #6. Videoblog - .com

Finally, we can include the “rel” attribute in the link, with the value “nofollow”. This will tell Google and other search engines that you don’t want them to follow that link. Doing so in this case would be a good practice for SEO.

I have read and accept the Privacy Policy.

In the last step we will uncheck “Options”, since we want our field to be mandatory.

Now we are going to add the legal text. As we mentioned in the first section, this paragraph serves to inform the user about the privacy policy of our site.

In this case we are going to use a test text. Keep in mind that you will have to change this text to yours, just like the link to your privacy policy.

We are going to add the legal tag below the checkbox that we have included in the previous step. We simply have to write the text, nothing else is needed to make it work.

As an extra step, we’ll include a header. We could also add some HTML and CSS to improve the look of our form:

In this case we have declared the “privacy” class in our style sheet. If you want to know more about this topic, we have a very complete one where you will learn how to improve and customize the designs of your sites.

We save, and now we are going to see our form! We enter the page where we have it placed and ready:

But this is not all, there is only one more small step left, a peculiarity of Contact From 7 compared to what we saw in the Gravity Forms tutorial.

Notifications in our email

Contact Form 7 does not store the messages that you send us anywhere, but simply forwards them to the email that we indicate.

As we have added an extra field that did not appear by default in our form, that of the checkbox, the value of this field will not reach our email. So the last step to have this confirmation in our email will be to include the shortcode of the new field in the body of the message that we will receive every time they write to us through the form.

See also  WordPress permalink settings - .com

To do this we go to the “Email/Message Body” tab, and insert the shortcode of our privacy field there. We have the available fields that we can include a little higher up in that same window.

If we do the test, now yes, we will see that when we send a message through the form we will also receive the value of the privacy box, which, being mandatory, will always be accepted.

And here we are! We already have our form prepared with the checkbox and the legal text, ready to pass the GDPR without problems.

Summary and conclusion

CF7 is a free plugin that does what it promises, creating forms. To adapt it to the General Data Protection Regulation, we will have to add a check box with the text and link to our privacy page, and also a small legal tag.

This plugin does not save the messages that are sent to us in the database, but it will send us a copy of them to the email that we indicate in its settings. So we will have to modify the template that is used in the body of the message, to also receive the value of this field.

And you already know, if you want to learn more about WordPress, I recommend my courses, where will you find the ones that you can access immediately 🙂

Loading Facebook Comments ...
Loading Disqus Comments ...