Add "privacy policy" check box in contact page for GDPR

5 replies · opened May 5, 2018

Ffrederic80May 5, 2018

Hello,

Is there an html/php update possible to foresee the contact form with a check box. Customers have to check it in order to agree with the privacy policy of the website.

Thanks to inform me how I can add this to contact form, and the php must be changed so I can see in the mail a customer has checked it or not.

Thanks a lot for your answer in advance.

Ffrederic80May 9, 2018

Can anyone help me here?
I found the checkboxes on the page "component-radios-switches.html" of the canvas site. (see attached)
How can I link this with the send button of the canvas contact form?
It's original state of the checkbox is unchecked. If customer has pressed on the "send" button, how can I include the information of the checked or unchecked checkbox in the email?

Thanks in advance!

Ffrederic80May 14, 2018

Anyone? Suggestions?

Ffrederic80May 15, 2018

								
								Ik heb de [Privacy policy](privacy-policy.html) gelezen en goedgekeurd.* / I have read and accepted the [Privacy policy](privacy-policy.html) *
							

This is the addition I made in the html contact form.
What do I have to do in the PHP file to make it work?

Ffrederic80May 29, 2018

Is there a fix / solution in html/php/... code?
Anyone?

SSemicolon WebSTAFFMay 31, 2018

Hello,

Thanks for your Patience!

The Code you are trying to use in HTML should work fine. Make sure that you simply add a Value to the Input tag:

For PHP, consider adding the following code just after the if( isset( $_POST['g-recaptcha-response'] ) ) { ... } Block of Code:

if( !isset( $_POST['checkbox-privacypolicy'] ) ) {
	echo '{ "alert": "error", "message": "GDPR not checked." }';
	die;
}

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard