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.

Please note:

  • 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

  1. Once you have created your survey, you will need to create a derived variable based on the ID.start paradata variable.
  2. Select the Variables icon on the Snap XMP Desktop toolbar.
  3. Click on the New Variable button
  4. Give the variable the name ‘time’.
  5. Select the Type as Derived and the Response as Single.
  6. 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’
  1. Save the derived variable and return to the Questionnaire design window.

Add the CAPTCHA images

  1. In the Questionnaire design window, add four Open Ended style questions at the start or end of the questionnaire.
  2. 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.
  1. 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.
  2. Enter the image file name or click Browse to select the image file. Set the Zoom and Alt Text as required. Click OK.
  3. Repeat this for each question, inserting a different CAPTCHA image for each question. This example uses four of the calculation images.
  4. 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.
A screenshot of a computer

Description automatically generated
  1. 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.
  1. 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.

Contents