reCAPTCHA embeds a CAPTCHA in your page to help prevent spam. reCAPTCHA requires additional configuration in the Site Settings.
To add reCAPTCHA to your site:
- In your organisation settings, under Hosting > Forms either create a new inbox or select manage on an existing inbox
- Select reCAPTCHA as your captcha provider.
- Sign up for an API key at https://developers.google.com/recaptcha/
- Enter your secret as your captcha secret key, and your site key as your captcha site key.
- Add reCAPTCHA to that form by following the instructions in the reCAPTCHA documentation
Once configured, any form submissions that fails to validate will return a 401 error page.
reCAPTCHA v3#
Additional JavaScript is required to use reCAPTCHA v3 with CloudCannon forms. This is to add the required input named g-recaptcha-response
before submitting. An example of how to set this up is:
- Add your form to the HTML
- Include the reCAPTCHA script tag with your Site Key
- Add JavaScript to catch form submissions
- Generate the recaptcha token
- Add token to a new input named
g-recaptcha-response
- Resubmit the form
HTML Form:
contact.html
copied
JavaScript:
contact.html
copied