This component will enable reCAPTCHA v3 functionality on your form. Workflow:
- Loads
https://www.google.com/recaptcha/api.js
if not available - Adds token to captcha field on your form
First, you need to set up some server side configuration via form builder. Read more about it here.
import {RecaptchaV3} from 'js-pimcore-formbuilder';
document.addEventListener('DOMContentLoaded', () => {
document.querySelectorAll('.formbuilder.ajax-form').forEach((form) => {
new RecaptchaV3(form);
});
});
document.addEventListener('DOMContentLoaded', () => {
document.querySelectorAll('.formbuilder.ajax-form').forEach((form) => {
new RecaptchaV3(form, {
disableFormWhileLoading: true,
reCaptchaFieldClass: 'input.re-captcha-v3',
});
});
});