This article will explain a couple of adjustments in wpDiscuz and Complianz to ensure reCaptcha is blocked and unblocked correctly. This is tested with the free, and integrated version of reCaptcha V2 in wpDiscuz.
What do we need to do?
We need to ensure reCaptcha does not throw an error, as wpDiscuz has a callback condition when loading the form. With reCaptcha enabled, the form throws an error, which is fine, but not on the front-end. We also need to have a clickable placeholder so users can enable reCaptcha before replying with wpDiscuz.
- Make sure Complianz is configured correctly.
- Add a placeholder to your wpDiscuz form.
- Add CSS to style the placeholder and remove front-end errors.
Making sure reCaptcha is blocked before consent is a quick check at your configuration. Visit the Wizard – 2. Consent and check these questions:
- Select the types of third-party services you use on your site: (Should include ReCaptcha)
Do you want to block reCAPTCHA before consent, and when consent is revoked? (Should be Yes)
- That’s it
Add a Placeholder to your wpDiscuz form
Go to wpDiszuz – Forms, click Edit on your specific form, and scroll to the overview below.
Add an HTML element above the GOOGLE RECAPTCHA field, above named by us “RECAPTCHA PRIVACY,” and go to edit:
The placeholder should be pasted in the HTML code: field. You can use the below snippet:
Styling the placeholder
The placeholder can now be styled. This is an example, but you can do whatever you want with the below CSS selectors.