Project / Support Center
Welcome, %1$s. Please login or register. February 28, 2024, 09:40: AM
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  Google Related  |  : google recaptcha - Not a Robot 0 and 1 Guest are viewing this topic. « previous next »
: [1]
: google recaptcha - Not a Robot  ( 8945 )
admin
Administrator
******


: 239


« : June 06, 2020, 01:44: PM »

 Just copy and add red & blue code

 Add this before end of head tag

<script type="text/javascript" src="https://www.google.com/recaptcha/api.js"></script>
          <script type="text/javascript">
      var onloadCallback = function() {
        grecaptcha.render('html_element', {
          'sitekey' : 'YOUR SITE KEY'
        });
      };
    </script>

</head>

Next add this after form tag

  </form>
                     <div id="dmxReCaptcha2" class="g-recaptcha" data-sitekey="YOUR SITE KEY"></div>
                      <script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit"
        async defer>
    </script>


Next add this after html tag

</html>
<script type="text/javascript">
   function my_button_click_handler() {

   var recaptcha = $("#g-recaptcha-response").val();
   if (recaptcha === "") {
      alert("Please check the recaptcha");
      return false;
   }
   return true;
};
</script>



Thats it
« : July 15, 2021, 04:06: PM admin »  

The Unknown Webmaster
: [1]  
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  Google Related  |  : google recaptcha - Not a Robot « previous next »
:  


Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!
Sorry, the copyright must be in the template.
Please notify this forum's administrator that this site is missing the copyright message for SMF so they can rectify the situation. Display of copyright is a legal requirement. For more information on this please visit the Simple Machines website.