Hello,

I posted this question in the webform forum but they suggested it is a question for the Captcha forum.

Hello,

I've created a webform (7.x-3.17) directly on a node and added Captcha. It works perfectly. However, I want to create one form in a block that will appear on multiple nodes. When I add Captcha to this webform block, it doesn't show up at all.

Is this a bug?

Thank you in advance.

M

CommentFileSizeAuthor
#9 formid.png68.87 KBsoxofaan

Comments

soxofaan’s picture

Category: bug » support
Priority: Major » Normal

How did you add CAPTCHA to the form? With the CAPTCHA administration links option? Or by directly entering the form_id on the CAPTCHA administration page?

Is there any form of caching on the blocks? Note that CAPTCHA does not play well with caching.

lilbebel’s picture

Hi there,

I added the form_id on the CAPTCHA administration page. I'm not sure how to check if there is caching on the blocks. Could you please indicate how I might see if there is?

Thank you for your help.

M

soxofaan’s picture

I added the form_id on the CAPTCHA administration page

What is the form_id you used?
The problem with webform and CAPTCHA is that there always two forms in play: the form you are building and the (admin) form you use to build this form. A bit of a mind twister :) so you have to be careful about using the right form_id (or the right CAPTCHA administration links)

I'm not sure how to check if there is caching on the blocks.

If you post the form, do you get a CAPTCHA error? (When you post a form, you typically get a new non-cached form)

lilbebel’s picture

I'm afraid the website isn't live yet so I can't show you the form. However, I put it the two following ids:

webform_client_form_30

and

block_webform_client_block_30

I wasn't sure which was correct so thought I'd put both in to cover all options. One is the form ID and the other is the form in a block ID.

I suppose I won't be able to post the form until the site is live in order to see if there is a CAPTCHA error. I did flush the cache in the CAPTCHA admin area.

Thanks,

M

soxofaan’s picture

I suppose I won't be able to post the form until the site is live

Why can't you post the form before the site is live? You can log in and browse it, so why not post a form?

lilbebel’s picture

I apologize. Of course you are right. I did a test form submission and it worked fine. Well, it didn't indicate a CAPTCHA error. It also didn't show the CAPTCHA at all. It's as though it's just ignoring it completely.

soxofaan’s picture

If you don't get an error, the CAPTCHA module is indeed not picking up the form.

how did you actually determine the form_ids "webform_client_form_30" and "block_webform_client_block_30"?

lilbebel’s picture

Hello,

I used Firebug to get the form and block ids.

soxofaan’s picture

StatusFileSize
new68.87 KB

I'm not sure 'block_webform_client_block_30' is the correct form_id. Is that the "value" value of the hidden input element with name "form_id"? (see highlighted line in screenshot)

E Johnson’s picture

Issue summary: View changes

@lilbebel

Did you ever solve this issue? I have the exact same problem and I see the maintainer of the Webform module directed you over here. #1549816: Captcha working on webform page but not on webform block

My webform indeed has a form_id like yours "webform_client_form_6" and the Webform is in a block.

Thanks.

E Johnson’s picture

My bad, I had to logout as Super Admin to see it. Anonymous users could see it. Hope that helps someone in the future.

wundo’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Håvard’s picture

@ E Johnson

Thanks, your comment #11 saved me :)

babin’s picture

#11 thank you!