Adding a CAPTCHA to your page
A CAPTCHA is a tool used to determine whether a user is a real person or an automated program (bot). The primary purpose of a CAPTCHA is to protect websites from automated abuse such as spam and malicious attacks. For example, it can stop bots from flooding a petition page with spam or help to mitigate credit card testing on a donation page.

To add the CAPTCHA, open up your page for editing. Now add a new form block at least to the penultimate page (you may add it to the first page too but sometimes spammers can submit data on the page before the thank you page so a captcha there is the priority).
Keeping the CAPTCHA in a separate block will allow you to position it to any desired location on the page. However, you may also want to add a CAPTCHA to an existing form block, in which case the CAPTCHA will appear immediately above the ‘submit’ button (as in the example below) when the page is rendered.
When you open up a form block for editing, you will see the option to Enable captcha.

Check the Enable captcha checkbox then click save.
Location-based captchas
While adding a captcha can prevent abuse of your pages by fraudsters and limit other types of attack, it can also have a negative impact for legitimate supporters’ user experience. To mitigate this there are CAPTCHAs available that only appear based on location.
When you enable a CAPTCHA in a form block, you will also be able to select which users will be presented with the CAPTCHA. The location will be determined by the IP address of the user.

The default is to display the CAPTCHA for all supporters who visit the page. By adding alternative rules, you can display the captcha only when the page is accessed from certain territories that you deem to be of higher risk. To set up your rules, click on

Adding High Risk rule
There is a predefined group rule called ‘High risk’, which includes a number of countries that have been identified as frequent sources of fraud and abuse. To select this rule to be used for this captcha, simply click on the name of the rule and click Use selected.

Creating custom rule
To create a new rule where you define the countries the CAPTCHA displays for, simply click on New Rule. This will allow you to select which countries should be included in this rule. The countries are organized into continents to make it easier to identify. To open up the list of countries, simply tap on the name of one of the continents.

Some countries will be listed with a ⚠️ next to their name as they have been identified as frequent sources of fraud and abuse and therefore High Risk. If you would like to highlight all of these countries, you can use the button Select all High Risk .
Once you have gone through all the continents, and identified the countries you would like to add to the rule, you can simply Save or Save and close.
You can also edit existing rules by clicking on .
For more information about how to work with forms in general, please see the section on form blocks.
Changing CAPTCHA language
You can change the CAPTCHA language using a script provided by Google. This example is configured to display the CAPTCHA in Spanish:
<script src='https://www.google.com/recaptcha/api.js?hl=es'></script>
The script can be updated with the applicable two character language code to display in other languages: https://developers.google.com/admin-sdk/directory/v1/languages.
The script can be added to a code block or in a page template, both of which support locales.
