So I have this form: https://upbeat-wilson-ca4160.netlify.com/contact/ . The site is build with Gatsby and if I remove captcha from it, it works just fine, and I can see form submissions in my panel. With the captcha though, not so much.
POST call returns status 303, which I understand is and issue with captcha token. However, in the body of the request “g-recaptcha-response” with captcha token is being sent. Both the environment vars are there (SITE_RECAPTCHA_KEY and SITE_RECAPTCHA_SECRET_KEY).
Unfortunately, I’m not able to check out the form- looks like maybe you’ve deleted the site and/or account? If you want to give it another shot, we’d be happy to try and troubleshoot! Others who find this post about the 303 error with reCaptcha 2 may find this related response helpful:
Thanks for sharing your new site. In digging into this, I’m wondering if this snippet from Google’s reCaptcha docs might be helpful:
I see that you have something like this in your <head> tag: <script src="https://www.google.com/recaptcha/api.js" async defer></script> so that’s good to go
In the body of your form, could you try adding this: <div class="g-recaptcha" data-sitekey="your_site_key"></div> <br/>
And delete 'g-recaptcha-response': captcha from your POST body in your JS? Alternatively, you could try changing 'g-recaptcha-response': captcha in the POST to 'g-recaptcha': your_site_key.