Webforms + ajax + recaptcha v3 fallback to alternative challenge

Created on 27 June 2025, 10 days ago

Problem/Motivation

Hello,

I was not able to use recaptchav3 on webforms with ajax.
There are some issues created for captcha/recaptcha, but none of these solutions/patches worked for me.
https://www.drupal.org/project/recaptcha_v3/issues/3356718 🐛 reCAPTCHA v3 not working in form with ajax elements Closed: works as designed

I also tried this approach, but it did not fix the issue https://www.drupal.org/project/recaptcha_v3/issues/3356718#comment-15051925 🐛 reCAPTCHA v3 not working in form with ajax elements Closed: works as designed

Steps to reproduce

  1. Download and install webform, captcha and recaptcha v3 module.
  2. Setup recaptcha v3 and create a new action. Set the threshold to ensure captcha v3 will be triggered.
  3. Create a simple webform, using ajax and place the captcha on the 2nd step. Setup for captcha v3 (or import the attached file)
  4. Test the webform, and see that captcha v3 was replaced by the fallback challenge instead of showing the captcha v3 flag.

Please also check the attached files, there is a screencast describing the bug.

🐛 Bug report
Status

Active

Version

6.2

Component

Code

Created by

🇧🇷Brazil daniel_arend

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024