Hello, I’m attempting to add a reCAPTCHA to my Sign Up page and I’m having an issue actually dropping a reCAPTCHA element into my Sign Up Form block.
I’ve generated and added my v2 API keys to the Site Settings > Forms > reCAPTCHA validation fields. As you can see from the image below, I’ve also made sure to enable reCAPTCHA validation on all forms. (I’ve also published to make sure the changes are live.)
From there, I created a demo form and dropped a reCAPTCHA into it for testing. As you can see from the image below, it displays the “This is a Preview” text, which tells me it appears set up correctly.
After publishing the test form and navigating to my staging site, I have a form with a reCAPTCHA and it works! Yay! So easy, so fast.
Now that I have reCAPTCHA enabled, I’ve run into a bit of a snag with my Sign Up page. I’m using the built in Webflow users to handle simple gated content. I’ve successfully built a sign up form and have created users with it. Also, yay!
The issue now is that I can’t drop a reCAPTCHA element into my Sign Up Form block. No matter where I try to drop it in the block, I always receive the message, “reCAPTCHA can only be placed in a Form”. But wait, isn’t the Sign Up Form block a form? I’m not seeing the issue, but I just cannot drop one in there.
The only thing I’ve done to successfully get it into the block is drop another form block, with the reCAPTCHA, into my Sign Up Form block. At least that will render it. But it’s useless at that point because that doesn’t validate the parent form. Yes, I can do some custom JS to pass the validation from the child form to the parent form, but I feel like there is probably another way that I’m missing.
So, my main question is, Why can’t I, or How can I, add my reCAPTCHA to my Sign Up Form block?
For some additional information, this seems to be the case on all Form Blocks related to authentication. Why is that? Is there any documentation I can read as to how those blocks function under the hood so that I can better understand and work with them?
Additionally, I feel that I should note that despite having enabled reCAPTCHA validation on all forms, I can still submit my Sign Up form and create users without a reCAPTCHA block. I can perhaps overlook this, but I’m receiving the “General error” message for all form errors. I think that is because the reCAPTCHA is not being set and there is no specific message for that. So it overrules any additional errors, such as invalid password.