First time working with Umbraco Forms so apologize if I’m overlooking something simple. I’m struggling to get Recaptcha v3 added to my site, I’ve validated that my issue is tied to captcha as without the form submits as expected, but with recaptcha I simple get a page refresh with no errors, following documentation I setup my appsettings to the following:
{
"Umbraco": {
"Forms": {
"FieldTypes": {
"Recaptcha3": {
"SiteKey": "my-key-here",
"PrivateKey": "my-secret-key-here",
"Domain": "Google",
"VerificationUrl": "https://www.google.com/recaptcha/api/siteverify",
"ShowFieldValidation": false
}
}
}
}
}
After rolling through errors and forums I ended up adding the “Umbraco.Forms.Web” tag helper to my view imports file, and then adjusted my master view to the following
@inherits UmbracoViewPage
@using Umbraco.Forms.Web.Extensions
<!DOCTYPE HTML>
<html>
<head>
@await Component.InvokeAsync("Meta")
@await Component.InvokeAsync("HeadStyles")
@await RenderSectionAsync("HeaderInject", false)
<script src="https://www.google.com/recaptcha/api.js?render=my-key-here"></script><!-- maybe redundant? -->
</head>
<body>
@await Component.InvokeAsync("Header")
@RenderBody()
@await Component.InvokeAsync("Footer")
@await Component.InvokeAsync("BodyScripts")
@await RenderSectionAsync("FooterInject", false)
<umb-forms-scripts />
</body>
</html>
I was able to get the captcha js script to render on my page, which I can see via network tab on the following page: Contact Us | Childcare, Preschool & Afterschool | Sunshine House
Has anyone encountered something like this before?