Skip to main content
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution
raw814
Getting Started

Google Recaptcha

I added this code to get a recaptch on our contact form from the google website.

<html>
 
<head>
   
<title>reCAPTCHA demo: Simple page</title>
   
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
 
</head>
 
<body>
   
<form action="?" method="POST">
     
<div class="g-recaptcha" data-sitekey="your_site_key"></div>
     
<br/>
     
<input type="submit" value="Submit">
   
</form>
 
</body>
</html>

 

 

It is showing up on the page however you can still click submit with out being required to check the box. Any advice on how I can fix this.

1 ACCEPTED SOLUTION
Nate
Super User II

Unfortunately the supplied code is only part of the equation (to show the widget on the page), you would also need server-side scripting on your end to validate and process the form.

https://developers.google.com/recaptcha/docs/verify

https://codeforgeek.com/google-recaptcha-tutorial/

 

If you're using a CMS like WordPress there are plugins available to help you build the form.  Another option is to use a stand-alone form service that'll take care of everything on the back end for you.

View solution in original post

1 REPLY 1
Nate
Super User II

Unfortunately the supplied code is only part of the equation (to show the widget on the page), you would also need server-side scripting on your end to validate and process the form.

https://developers.google.com/recaptcha/docs/verify

https://codeforgeek.com/google-recaptcha-tutorial/

 

If you're using a CMS like WordPress there are plugins available to help you build the form.  Another option is to use a stand-alone form service that'll take care of everything on the back end for you.

View solution in original post