hybridinteractive / craft-contact-form-extensions

Adds extensions to the Craft CMS contact form plugin.
MIT License
43 stars 36 forks source link

reCAPTCHA doesn't work with Ajax #195

Open darwinsoftware opened 4 months ago

darwinsoftware commented 4 months ago

Using reCAPTCHA v3 doesn't work with a form that uses Ajax.

The JS code which is added to the form waits for a form submit trigger, but that trigger is interrupted with an event.preventDefault() by the JavaScript that handles the form submission via Ajax.

As such, the reCAPTCHA hidden input is never populated with a value and all form submissions fail.

The same applies to both of the v2 options.

samuel-clara commented 3 weeks ago

Any planned improvements on this?