Cookie Consent - How to use setup reCaptcha on multiple forms on page?

I have multiple forms on my page and the reCaptcha instructions only shows how it works on one form - Cookie-Compliant reCaptcha in Webflow - Finsweet Components

Can you please show how it can be implemented for multiple forms on the page?

Hey @dave1! :waving_hand:

We can definitely help you implement Cookie Consent-compliant reCAPTCHA on multiple forms. The documentation example only shows one form, but this approach works great for multiple forms too.

To implement this across multiple forms while maintaining GDPR compliance:

  1. Remove Webflow’s native reCAPTCHA from all your forms and any site keys from settings

  2. Add a unique reCAPTCHA container div inside each form:

    • Form 1: <div id="recaptcha-form1"></div>
    • Form 2: <div id="recaptcha-form2"></div>
    • Form 3: <div id="recaptcha-form3"></div>
  3. Modify the JavaScript to handle multiple instances - each form needs its own unique ID, but they’ll share the same site key and consent logic

When testing, make sure reCAPTCHA doesn’t load before consent, each form’s reCAPTCHA works after consent, and server-side validation works for all forms.

This approach keeps you GDPR compliant while supporting as many forms as you need!

Let us know if you need more help - @Support-Luis or @Support-Pedro can assist with any custom code implementation questions.