This repository contains the code base for a Sitecore Google ReCaptcha Enteprise Version using Sitecore Forms
You will find more info in the following link: Blog Entry
You can easily install Sitecore Forms ReCaptcha by adding a Nuget Package in your Website
Project.
PM> Install-Package SitecoreModules.Foundation.Forms
To configure Google's reCaptcha integration, it is required to duplicate and remove .example extension to the following file \Website\App_Config\Include\Foundation\SitecoreModules.Foundation.Forms.ReCaptchaEnterprise.nonprod.config.example
If you don't know how to generate keys refer to the following link: reCaptcha Keys
In the next table specify the values that you need to configure.
Setting | Value |
---|---|
Foundation.Forms.ReCaptchaEnterprise.Api.Url | https://www.google.com/recaptcha/enterprise.js?render={0} |
Foundation.Forms.ReCaptchaEnterprise.Api.SiteVerify | https://recaptchaenterprise.googleapis.com/v1/projects/[PROJECT-ID]/assessments?key={0} |
Foundation.Forms.ReCaptchaEnterprise.PublicKeyV3 | [Public – V3] |
Foundation.Forms.ReCaptchaEnterprise.PublicKeyV2 | [Public – V2] |
Foundation.Forms.ReCaptchaEnterprise.ApiKey | [Api Key] – This is used for Server Side Validation |
Foundation.Forms.ReCaptchaEnterprise.Score | Default to 0.5. |
You need to ensure that forms.recaptcha.js
is added on standard values to load the js functionality that is required to work.
Open Form's standard values /sitecore/templates/System/Forms/Form/__Standard Values
and add forms.recaptcha.js
to the end of Scripts field.
- Create a Sitecore Form
- Drag and Drop "ReCaptcha Enterpise" form control..
- Configure Invisible / Checkbox
- Save your Form