we have to include in the contact form the acceptance box of the privacy policy, that in html is simple with this code
<input type="checkbox" name="aceptar_terminos" id="aceptar_terminos" value="aceptar_terminos" /> He leído y acepto la <a href="#" target="_blank">Política de Privacidad</a>
What should be included in the php so that if that box is not selected, the form can not be sent?
this is the php we have now
<?php
$field_name = $_POST['cf_name'];
$field_email = $_POST['cf_email'];
$field_message = $_POST['cf_message'];
$mail_to = '[email protected]';
$subject = 'Mensaje desde la web'.$field_name;
$body_message = 'De: '.$field_name."\n";
$body_message .= 'E-mail: '.$field_email."\n";
$body_message .= 'Mensaje: '.$field_message;
$headers = 'From: '.$field_email."\r\n";
$headers .= 'Reply-To: '.$field_email."\r\n";
$mail_status = mail($mail_to, $subject, $body_message, $headers);
if ($mail_status) { ?>
<script language="javascript" type="text/javascript">
alert('Gracias. Nos pondremos en contacto lo antes posible.');
window.location = 'contactar-con-catoira-camp-campamento-de-verano.html';
</script>
<?php
}
else { ?>
<script language="javascript" type="text/javascript">
alert('Hmmm. Algo ha fallado en el formulario de contacto. Mande por favor un correo a [email protected]');
window.location = 'contactar-con-catoira-camp-campamento-de-verano.html';
</script>
<?php
}
?>
Thanks for the help