FormBackend logo

Spam

hCaptcha

Implement hCaptcha to protect your forms from spam and abuse

First you’ll need to create a key on hCaptcha’s site. This can be done here https://www.hcaptcha.com/

These are the required steps for you to set this up:

  • Create an account with hCaptcha to get a sitekey and a secret.
  • Add the hCaptcha script to your form.
  • Update the settings for your given form (the “Settings”-tab) with the hCaptcha sitekey and secret.

Create a hCaptcha site key

Go create a new account on https://www.hcaptcha.com/. This will give you a sitekey and a secret as well as a tag you need to insert into your form and a script you need to call.

It’ll look something like this:

<form method="POST">
  <div class="h-captcha" data-sitekey="YOUR-SITEKEY"></div>
  <script src="https://js.hcaptcha.com/1/api.js" async defer></script>
</form>

Add the secret to FormBackend

For your specific form, go to the “Settings”-tab and fill in the secret field for hCaptcha. We’ll use that to verify the submission when someone submits your form.

That’s it! Your submissions will now be checked against hCaptcha’s API and if it’s a bot, it’ll be marked as spam.