Adding a CAPTCHA style question
CAPTCHA is a term that stands for Completely Automated Public Turing Test to Tell Computers and Humans Apart. It is a type of challenge-response test that is used to determine whether the user of a website or online service is a human or a bot. CAPTCHAs are designed to be easy for humans to solve, but hard for bots and other malicious software to figure out. By using CAPTCHAs, websites can prevent spam, abuse, and automated attacks from bots.
Some examples of CAPTCHAs are:
- A checkbox that says, “I’m not a robot”.
- A set of images that the user has to select based on a given criteria (e.g., select all the traffic lights).
- A distorted text or audio that the user must type or speak.
- A mathematical equation or a logic puzzle that the user must solve.
This help page shows you how to create a CAPTCHA , by adding a mathematical calculation image to your survey, which will automatically show a different image based on the time that the participant starts the survey. However, you can create a CAPTCHA that can change at different rates or using different criteria. We have supplied you with various images to allow for an image change every five seconds. The calculation can be as complex as you require.
The CAPTCHA works best at the start or end of the survey. We recommend that the CAPTCHA is displayed on a separate page, using a page break.
- CAPTCHA is not currently available on text only accessible surveys where the strict rules and no dynamic content are set.
- This CAPTCHA option does not detect bots, however it may slow them down.
Downloading the sample CAPTCHA images
To help use a CAPTCHA in your survey we have provided some sample images.
Download the sample CAPTCHA images here: captcha-images.zip
Example CAPTCHA style question
Create the derived variable
- Once you have created your survey, you will need to create a derived variable based on the ID.start paradata variable.
- Select the Variables icon on the Snap XMP Desktop toolbar.
- Click on the New Variable button
- Give the variable the name ‘time’.
- Select the Type as Derived and the Response as Single.
- In the Code list, add the following, with each on a separate line:
- Label ‘1’ and Value ‘ID.start second<16’
- Label ‘2’ and Value ‘ID.start second<31’
- Label ‘3’ and Value ‘ID.start second<46’
- Label ‘4’ and Value ‘true’
- Save the derived variable and return to the Questionnaire design window.
Add the CAPTCHA images
- In the Questionnaire design window, add four Open Ended style questions at the start or end of the questionnaire.
- In each of the questions, add a conditionally asked routing rule based on each code label in the derived variable. For example, in the first question set time = 1, the second question set time = 2 and so on.
- To insert the CAPTCHA image, place the cursor in the question text area of the first Open Ended question then click the Insert | Image menu.
- Enter the image file name or click Browse to select the image file. Set the Zoom and Alt Text as required. Click OK.
- Repeat this for each question, inserting a different CAPTCHA image for each question. This example uses four of the calculation images.
- On each of the Open Ended questions make sure the following are set in the Questionnaire Properties
- Must Answer set to Yes
- Box Scaling set to Fixed
- Valid set to the answer to the image question.
- Change the position of the Open Ended box so that is next to the calculation image.
- Click on Positions from the second drop down box.
- Change the Question to Beside.
- Save the changes to the questionnaire.
Invalid CAPTCHA during the interview
If the wrong answer is given, a warning is shown to alert the respondent that they need to re-enter the CAPTCHA response.