Closed (fixed)
Project:
CAPTCHA
Version:
6.x-2.x-dev
Component:
Captcha API (captcha)
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 May 2009 at 17:38 UTC
Updated:
10 Jun 2009 at 02:10 UTC
Jump to comment: Most recent
Comments
Comment #1
jrosen commentedI am looking to accomplish something similar... subscribing.
Comment #2
soxofaan commentedIn the CAPTCHA 6.x-2.x branch (e.g. 6.x-2.0-beta5), CAPTCHAs are Drupal Form API form elements, and you can add a CAPTCHA challenge to a form like you add textfields and checkboxes:
However, I would recommend to use the standard CAPTCHA admin interface instead, as this will be less confusing for the users of your module. e.g. how can they disable/change the type of a CAPTCHA if you hardcoded it in a module?
This brings us to your next question:
this is possible (and recommended over the solution above) with a call to the following function
This function resides in captcha.inc, so you'll typically have to load it e.g. with
module_load_include('inc', 'captcha');hope this helps.
Comment #3
barrett commentedLooks like exactly what I need. Many thanks, soxofaan.
Comment #5
merzikain commentedThis is for anyone looking for how to use a captcha type other than Math and haven't been able to figure it out.
I wanted to create a recaptcha field on my form so I set #captcha_type to "recaptcha/reCAPTCHA"
If you want to use something else and don't know what it should be, the easiest way to figure it out is to go to /admin/config/people/captcha and use something like firebug (or just hunt through the page source) to see the options for the Default challenge type field on that admin page. The value of each option is an available setting for #captcha_type.
Not exactly rocket science but also not completely obvious to some so hopefully this helps someone out there.