I'd like to activate CAPTCHA for a specific comment form of a content type and for others, not. Example: Activate it for the content type Profile, but not for Story.

If it's not possible now, then I'd like to ask to add as a future feature.

Thanks for attention!

Comments

soxofaan’s picture

Title: CAPTCHA for comment form of a specific content type: possible? » How to add CAPTCHA on comment form of a specific content type?
Component: Code » Captcha API (captcha)

Hello,

This is not possible with the CAPTCHA module and I think it is a bit too specialized to implement this in the core CAPTCHA module.

However, it would take very few lines to do it yourself in a custom "glue" module. Adding a CAPTCHA element to a form is as simple as adding a text field to a form:

$form['my_captcha_element'] = array(
  '#type' => 'captcha',
);

Also see #743056: Document how to add a CAPTCHA programmatically.
In short: you would need a simple hook_form_alter() implementation with the required logic to add the CAPTCHA element to the desired form.

hope this helps

wundo’s picture

Issue summary: View changes
Status: Active » Closed (outdated)