Found that you can not use multiple captchas on the same page. But the site itself costs 1 page and there is a registration form, a password recovery form, a confirmation form. On all forms worth 1 captcha. Now implemented as:

<script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" async defer></script> <script type="text/javascript"> var onloadCallback = function() { mysitekey = 'Ключ'; grecaptcha.render('recaptcha1', { 'sitekey' : mysitekey }); grecaptcha.render('recaptcha2', { 'sitekey' : mysitekey }); grecaptcha.render('recaptcha3', { 'sitekey' : mysitekey }); grecaptcha.render('recaptcha4', { 'sitekey' : mysitekey }); }; </script> 

Well

 <div class="g-recaptcha" id="recaptcha1"></div> 

Everything works wonderfully, but the last time some users started complaining that the captcha is not displayed, I checked everything on me, I wrote everything off on adblock, but I started checking periodically and indeed, the captcha was not displayed. Having done a few dances with a tambourine, clearing the cache history and so on, it reappeared, then disappeared again, now it seems to be displayed. What is it, how to deal with it? Please do not advise to rewrite everything under separate pages: ((

  • Why it is impossible to make one common captcha for all forms? - Anton Shchyrov
  • and the site on what? not asp.net mvc by any chance? - tCode
  • @tCode php samopisny. - Winteriscoming
  • @AntonShchyrov Pages are made by pop-up windows, each window has its own captcha. - Winteriscoming
  • @Winteriscoming So one page or several? - Anton Shchyrov

0