Can’t validate consent_checkboxes fields
-
Hello,
I have used…
GDPR::consent_checkboxes();
…in my registration form which produced a list of form fields, however, I am struggling with validating them. On the front-end, validation works, but if I delete the checkbox in inspect I can still proceed with registration without selecting required fields. In my backend validation hook (using PMPRO plugin), I have tried
if (!isset( $_REQUEST['privacy-policy'] )) { //do validation return false; }
… which normally fires for other fields but is not picking up GDPR fields. I have tried changing the $_REQUEST to ‘user_consents[privacy-policy]’ and ‘privacy-policy-consent’ too but having no luck.
Any ideas how I can fire validation for the consent_checkbox fields? Any help would be greatly appreciated!
Cheers,
Andrew
- The topic ‘Can’t validate consent_checkboxes fields’ is closed to new replies.