Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Integrate with spam module (http://drupal.org/project/spam)
Check all the textareas for spam during form validation and if one triggers,
set a form error and inject a CAPTCHA as a second step to the form.
I know Mollom does something similar, but Mollom is way overkill, because it requires an account on an external site, and has trusted users, which we don't really need etc, etc. AND Mollom cannot be used with any form like CAPTCHA can.
Comments
Comment #1
soxofaan CreditAttribution: soxofaan commentedI don't know the spam module very well. I used it in the past, but it seems to be evolved quite a bit since then.
It certainly would be possible, but for the moment I don't have time to investigate/implement this.
Things to take into consideration: should the integration be implemented in the spam module or in the CAPTCHA module? For the moment I am inclined to say in the spam module, but that is just a first impression.
they are working on that: #245682: Enable use of Mollom for any form
Comment #2
treksler CreditAttribution: treksler commentedI looked at the CAPTCHA modulae a bit .. looks like there is currently no way to allow another module to use code from the CAPTCHA module to inject CAPTCHAs on the fly.. (the CAPTCHA module seems to assume all captcha points are stored in the database)
So, I am thinking that if I refactored CAPTCHA to allow any module to inject CAPTCHAs on the fly, I could put the necessary logic into the spam module....
Comment #3
soxofaan CreditAttribution: soxofaan commentedThis is true for CAPTCHA 6.x-1.x and earlier.
But the CAPTCHA branch 6.x-2.x is the result of major refactoring to make it possible for other modules to inject CAPTCHAs in the way they want. CAPTCHA 6.x-2.x defines a CAPTCHA element that can be added to forms just like text fields an option lists.
The core CAPTCHA module just provides a basic admin interface that indeed stores its captcha points in its database table.
Adding a CAPTCHA to a form is just as easy as:
e.g. also see #536274: Show Captcha After X Unsuccessful Attempts
Comment #4
soxofaan CreditAttribution: soxofaan commentedI made a separate documentation thread about this feature: #743056: Document how to add a CAPTCHA programmatically
I think it's best to mark this one as a duplicate