Answer the question
In order to leave comments, you need to log in
How to put 2 or more reCAPTCHAs?
Hello! I have two questions! There are two recaptchas on the site, one in the modal window, the other at the bottom of the footer. The one in the modal is displayed! And the one that should be at the bottom, no! How to fix it?
The second issue is that the recaptcha in the modal doesn't work! After clicking on the captcha, a long download starts and an error:
Answer the question
In order to leave comments, you need to log in
<form>
<h1>Form 1</h1>
<div><input type="text" name="field1" placeholder="field1"></div>
<div><input type="text" name="field2" placeholder="field2"></div>
<div id="RecaptchaField1"></div>
<div><input type="submit"></div>
</form>
<form>
<h1>Form 2</h1>
<div><input type="text" name="field3" placeholder="field3"></div>
<div><input type="text" name="field4" placeholder="field4"></div>
<div id="RecaptchaField2"></div>
<div><input type="submit"></div>
</form>
In your javascript code, you have to define a callback function for recaptcha:
<script type="text/javascript">
var CaptchaCallback = function() {
grecaptcha.render('RecaptchaField1', {'sitekey' : '6Lc_your_site_key'});
grecaptcha.render('RecaptchaField2', {'sitekey' : '6Lc_your_site_key'});
};
</script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question