Google captcha on multiple pages?

Hey everyone. I am having some issue rendering my v2 google captcha on multiple pages.

So on page 1, it works completely fine. I have this:

<script src="https://www.google.com/recaptcha/api.js?onload=recaptchaCallback&render=explicit" async defer></script>

on my head tag, and the captcha loads great.

However I need the captcha on page 2 as well, but when I do the same thing, I get this error:
ReCAPTCHA placeholder element must be empty

After researching, I know its because I’m loading the script twice, however I have tried different solutions and I can’t get it to work on other pages aside from page 1.

Page 1 is where I declare it in my head tag.

Does anyone have a solution for this please?

Do you have some code to share that can help us reproduce the issue?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.