CAPTCHA/RECAPTCHA Spam Protection

This section describes how to enable CAPTCHA/RECAPTCHA spam protection to your webforms.  This feature is only available if your site includes both the:

  • CAPTCHA module - this enables basic captcha protection (managers can configure math questions)
  • RECAPTCHA module - this enables support for the more widely popular "i am not a robot" checkbox interactive exercise (as depicted below)


Adding CAPTCHA/RECAPTCHA Protection to a Custom Webform

If both the modules above have been enabled on your site, and your drupal backend role includes permissions to modify captcha settings, you can add CAPTCHA protection to any custom webforms by following the steps below.

1. Obtain the Drupal webform machine name.  After creating or updating a webform, navigate to the page where it is displayed.  Right click on the first form input and click "inspect". This will open the browser's inspector, with the html of the item you right clicked on highlighted.  Look for the <form> tag a few rows above the highlighted row and note the form "id" value. (in the example below, it is webform-client-form-57038 )

2. Navigate to the CAPTCHA configuration page.  Go to Configuration > People > Captcha

This will load a configuration page similar to the screenshot below.

3. Scroll down to the last row with the empty text input field in the table.  

A.  in the text input field, enter the webform's machine name by replacing any dashes (-) in the ID you noted with underscores (_).  In our example, the machine name to type in would be: webform_client_form_57038  (the ID we noted was webform-client-form-57038)

B.  select Default challenge type (which should already be set to Recaptcha), or pick another type.

C.  click the save button. 

4.  Now visit the webform from a different browser or in private/incognito mode to check that the Captcha is loading.  If the site's theme / layout follows common practices, the Captcha should load automatically without overlapping other elements or being concealed.  If you do encounter such a problem, try clearing the CAPTCHA placement cache (button in middle of the configuration page) and then Drupal cache.  If it persists, you'll probably need a developer to adjust styles for positioning the captcha.

Recently Updated in Webforms

Updated Documentation Section Author/Editor
Sat, 09/23/2017 - 13:47 Webforms >Webforms >CAPTCHA/RECAPTCHA Spam Protection ansonwhan
Mon, 07/13/2015 - 11:02 Webforms >Setting Webform Content, Form Elements, Criteria, and Behaviors >E-mail Notifications admin
Fri, 07/10/2015 - 16:01 Webforms >Input Type Configurations >Date admin
Fri, 07/10/2015 - 16:00 Webforms >Manage Form Fields/Elements >Input Type Configurations admin
Fri, 07/10/2015 - 15:55 Webforms >Create/Manage Webforms >How to Add a New Webform admin