Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 65051

Trigger in Recaptcha v3

$
0
0

Replies: 0

Hello Takayuki Miyoshi,

As a developer, I needed a trigger with the token of Recaptcha v3, so I had to add it in your code.

Exactly in ./modules/recaptcha.php, line 82 (inside the function of ‘then’)

I added the next code:


/* trigger DOM event */
var event = new CustomEvent( 'wpcf7recaptchaLoaded', {
    bubbles: true,
    detail: token
} );

document.getElementsByClassName( 'grecaptcha-badge' )[ 0 ].dispatchEvent( event );

Would it be possible to include this in the next upgrade?

Thanks for reading!! 🙌

  • This topic was modified 7 minutes ago by Oropesa.

Viewing all articles
Browse latest Browse all 65051

Trending Articles