I have one page with two reCAPTCHAs. I've followed the examples I found around and did like this:
<script>
var CaptchaCallback = function(){
grecaptcha.render('captcha_associe-se_1', {'sitekey' : 'Key'});
grecaptcha.render('captcha_associe-se_2', {'sitekey' : 'Key'});
};
</script>
<script src='https://www.google.com/recaptcha/api.js?onload=CaptchaCallback&render=explicit' async defer></script>
Then, in the forms:
...
<div style="margin-left: 145px; float: left;"><div id="captcha_associe-se_1"></div></div>
</form>
and
...
<div style="margin-left: 145px; float: left;"><div id="captcha_associe-se_2"></div></div>
</form>
Problem is I need more two reCAPTCHAs within another page, but by adding more render functions simply does not work, and no error is shown. Besides, I have a message in console saying the placeholder does not exist, and it points to the first line inside of the CaptchaCallback, but everything works correctly.
Uncaught Error: ReCAPTCHA placeholder element does not exist