My webform is getting a lot of spam entries - what can I do?

This article only applies to webforms. You may want to add captcha to other forms.

Many organizers have webforms for people to fill out to apply for a program or give feedback.

Unfortunately, there are a lot of people on the Internet that look for open forms like that and fill them out to see what they do and if they are vulnerable to attack.

You can stop these bots by enabling a captcha - a simple question that someone has to fill out to prove they are a human and not a robot.

Enable the captcha module

The first step is to enable the captcha module. This module is a drupal module - so enabling it means clicking on the left sidebar: Administration -> Modules. Then, find the captcha module and enable it. You only need the captcha module to proceed. But if you want an image based captcha, you can choose to also enable the Image Captcha. If you want to pull in Google code to your database, you can choose recpatcha, but that will compromise your privacy.

You'll need permissions to access the captcha module. If you don't have these permissions, please contact

Find your webform ID.

Next, go to your webform. If you are logged in, you will see an edit link. Hover your mouse over the edit link and then look at the address reflected at the bottom of your screen. In the screen grab below you can see it in the bottom left corner. This will display the ID number of your form. In the screen grab below it is: 43.

Configure Captcha

Set Default Challenge Type by selecting the drop down option "Math (from module captcha)"

Turn off captcha for logins by setting user_login, user_login_block, user_pass, and user_register_form to "- No challenge -"

Now, configure a captcha to appear for this web form.

On the left side bar, click Administration -> Configuration -> People -> CAPTCHA

Add a new entry to the captcha configuration for your web form.

The new entry should start with webform_client_form_ and end with the id number you got above. So, for example, if your id is 43, you would enter webform_client_form_43.

Click Save Configuration at the bottom of the page and test!

Admin Tasks
Collecting and Managing Contact Information
Customizing PowerBase