Adding a captcha, either through captcha admin or using hook_form_alter, to a views exposed filter form

1) loads initially with
* Math question field is required.
* The answer you entered for the CAPTCHA was not correct.

2) after submission incorrectly gives:
The answer you entered for the CAPTCHA was not correct.

reproduced by another user here:


"It seems an exposed view filter form is automatically submitted (before you get the chance to fill it in) in order to show a default view."


ransomweaver’s picture

andykisaragi’s picture

Same issue here...

konrad1811’s picture

When I added CAPTCHA on exposed view filter using admin link there was a kind of error [wrong form id was taken - from div not from views exposed filter form].

When I addedn correct ID form and assigned proper CAPTCHA [image] there was no error, however CAPTCHA didn't show.

I believe this is ID form confusion.

oh forgot my CAPTCHA version... but maybe here the same?

elachlan’s picture

Issue summary:View changes
Status:Active» Postponed (maintainer needs more info)

Is this still an issue?

genjohnson’s picture

Version:6.x-2.4» 7.x-1.1

I'm running into this issue with the latest version, 7.x-1.1.

genjohnson’s picture

Status:Postponed (maintainer needs more info)» Active
radj’s picture

Same issue here. I tried adding the view exposed form ID into the Captcha settings and disabled captcha for that form but it still shows up.

alfredo.ardito’s picture

Same issue. It works fine if I disable "Default challenge on non-listed forms."

michalgreksak’s picture

I have a Webform as a contact form with reCAPTCHA and in the Captcha settings (admin > config > people > captcha) have "Default challenge on non-listed forms." enabled. After that, when I set the view exposed form I get the message "The answer you entered for the CAPTCHA was not correct". That I needed to turn of a Captcha in the view and also has "Default challenge on non-listed forms." enabled for webform to be working.
I found a simple solution:
in the Captcha settings I set a new form_id
*views_exposed_form* and set it to *- No challenge -*
From that moment I have the view exposed form disabled and everything works as I expecting =)
I have Captcha 7.x-1.3