I gave permission to use the site-wide contact form for anonymous users, then enabled the CAPTCHA point for it. However, the CAPTCHA doesn't appear on the Contact form, but it works on the User Registration Form.

Comments

aonsquared created an issue. See original summary.

ankur.addweb’s picture

@Arthur, I have checked captcha functionality with same version and it works fine for me.

Make sure you are adding a FORM-ID instead of form machine_name while adding a new captcha point [admin/config/people/captcha/captcha-points/add].

gg24’s picture

StatusFileSize
new77.28 KB

Hi @aonsquared,

I tried reproducing the issue but couldn't find it. Please mention the steps to reproduce this issue.

Testing steps are as follows:-

  1. Enabled Captcha Module.
  2. Created a contact form.
  3. Gave the Use the site-wide contact form permission to anonymous user.
  4. Enabled captcha point for this particular contact form.
  5. Accessed the same form from Anonymous user account.
  6. Functionality works as expected, can see the captcha.

Attaching captcha screenshot too taken from Anonymous user's account.

Thanks!

gg24’s picture

StatusFileSize
new85.42 KB

Screenshot for comment #3.

Thanks!

gallegosj’s picture

I'm experiencing this same issue. I created a custom form using the core contact module, but I can't get CAPTCHA to show up on it. It shows up fine for user registration and user login. By the way, what is the FORM ID and how is it different from the machine name?

adamps’s picture

Title: CAPTCHA not appearing in site-wide contact form but works on user registration form » Admin interface for CAPTCHA on contact forms is confusing

I had the same problem, and fixed it by following instructions in #3.

My problem was that I had enabled the "contact_message_feedback_form" captcha point that was provided by default.

The resolution was to create a new CAPTCHA point as per step 4 of #3. The captcha point needs to be contact_message_XXX_form, where XXX is the machine name - you can see the machine name on the "Edit contact form" page admin/structure/contact/manage/XXX.

The process seems much less intuitive that it was in D7, where things worked well with a default install. Here are my suggestions

  • EASY Delete captcha.captcha_point.contact_message_feedback_form.yml. As far as I can see, the contact module does not define a matching default contact form, so this is really confusing.
  • EASY Enhance captcha_install to automatically create captcha points for contact forms similar to existing code for nodes.
  • HARDER "Add captcha point" should show all the "well-known" captcha points to select from (using the logic in captcha_install refactored into a function). Of course keep the option to enter in a manual value. Maybe once done this, don't need to create captcha points on install - it can be untidy with a large number of content types and I would guess 95% of users want user*, contact*, comment* more than node*.
gallegosj’s picture

Great catch @AdamPS! A new captcha point using the format you provided fixed the issue for me. Thanks! I agree with your suggestions.

elachlan’s picture

Category: Bug report » Support request
Status: Active » Fixed
adamps’s picture

@elachlan Please can you explain the reason for setting this to fixed?

In #6 I made 3 suggestions - have they been done? If not, would it make sense to raise a feature request for them?

elachlan’s picture

If you could raise a Change Request and link it, that would be great.

Thanks.

Status: Fixed » Closed (fixed)

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

adamps’s picture

Sorry for the delay I lost track of this issue. I have now raised two new issues: