Skip to content

Sitecore Forms Integration with Google ReCaptcha Enterprise

Notifications You must be signed in to change notification settings

RobertoArmas/Sitecore-Forms-ReCaptcha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sitecore Forms ReCaptcha

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

Nuget Installation

You can easily install Sitecore Forms ReCaptcha by adding a Nuget Package in your Website Project.

PM> Install-Package SitecoreModules.Foundation.Forms

Configuration

Generate Api Keys and Duplicate Config File

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.

Add JS to load into Sitecore Forms

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.

Usage:

  1. Create a Sitecore Form
  2. Drag and Drop "ReCaptcha Enterpise" form control..
  3. Configure Invisible / Checkbox
  4. Save your Form

About

Sitecore Forms Integration with Google ReCaptcha Enterprise

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published