Adding captcha to webform drupal
NOTE: This is a very old migrated blog post. It may have incorrect formatting.Just a heads up, you may notice that the heading for this blog isn't exactly in proper english. What I'm doing is writing up the title in the exact wording people would google for an answer to their question. In this case, I am writing about how to add Captcha (or reCaptcha) to a web form in drupal. When searching google for the answer, the term above is what most people would use... or at least I used to find my answer. So what is the trick to adding Captcha to a web form in Drupal? Well it's quite simple actually. First, create the web form. Next, get the webform ID. To get the webform ID either use firebug, or stroll through the source code, and grab it. The source doe will look something like this:
See the part that says "id=", that's where the ID is defined. Now, the only thing you need to do when taking this over to Captcha, is replace the -'s with _'s. So in the case above, webform-client-form-8 becomes webform_client_form_8. At that point you're all set! Hopefully this explanation makes your life a bit easier!