Jamform | Simple, Serverless, Forms Made Easy


Jamform supports integration with Google reCAPTCHA to help prevent spam and automated submissions. When you setup reCAPTCHA on your form, your users will have to solve an 'I am not a robot' challenge before they submit. The reCAPTCHA script will automatically include the challenge result in your form data and Jamform will verify this result on our servers before accepting the submission.

reCAPTCHA v2 Setup:

Getting your reCAPTCHA set up is easy, first you will need to visit the Google reCAPTCHA dashboard and sign in with a Google account. From there, navigate to the Admin console to register a new site.

On the 'Register a new site' page, enter a label to identify your site in the future. Under 'reCAPTCHA type' select 'reCAPTCHA v2' and '"I'm not a robot" Checkbox'.

Google register new site dashboard page recaptcha type

Under 'Domains', add the domain your form will be hosted on. If you want to be able to test your form locally add 'localhost' as well, but you should remove that before making the form public.

Google register new site dashboard page domains

When you hit submit you will be given a 'Site Key' as well as a 'Secret Key', keep these keys somewhere you can access for the rest of the setup instructions.

Google register new site dashboard page API keys

Add reCAPTCHA to your site:

Now that you have set up your reCAPTCHA on the Google dashboard, you will need to setup the reCAPTCHA field in the form on your site. First, add the reCAPTCHA script to the head section of your website.

<!DOCTYPE html>
    <script src="https://www.google.com/recaptcha/api.js" async defer></script>
    The content of the document......

Next, add reCAPTCHA to your form by creating a div element in your form. Give this div a class with the value 'g-recaptcha', and a data-sitekey attribute, in which you will add the 'Site Key' you were given in earlier steps.

<form action="https://jamform.com/f/{formId}" method="POST">
  <input type="text" name="name" />
  <input type="email" name="email" />
  <div class="g-recaptcha" data-sitekey="6BemDA5aKFAAAIISJAYIlU1c564eRmFw-lodPm2U-x"></div>
  <button type="submit">Send</button>

Finally, you will need to navigate to your form dashboard and click on the 'Settings' tab. On the 'reCAPTCHA' enter the reCAPTCHA 'Secret Key' you received in earlier steps.

Jamform reCAPTCHA field with secret key

That's it! After you click 'Update reCAPTCHA key' your reCAPTCHA will be set up. Now every time someone tries to submit through your form they will be challenged to show they are not a robot and must pass the challenge for their submission to be saved through Jamform.