The following article describes how to create a custom captcha widget using Google reCAPTCHA v2 or v3.
Before implementing the widget, you must configure Sitefinity CMS. Perform the following:
NOTE: The version of the reCAPTCHA configuration for the secret key must correspond to the version of the reCAPTCHA widget that you are creating.
You create the widget’s ViewComponent in the Renderer application. Perform the following:
ViewComponent
reCAPTCHA v2
reCAPTCHA v3
You create the widget’s View in the Renderer application. Perform the following:
View
Views/Shared/Components/Captcha2
Views/Shared/Components/Captcha3
Captcha2
Captcha3
You create the widget’s script in the Renderer application. Perform the following:
Scripts
NOTE: In the code samples above, change the <Captcha V2 site key> or <Captcha V3 site key> with the actual site key from the configured API key pair.
<Captcha V2 site key>
<Captcha V3 site key>
RESULT: After you build the project, the widget is displayed inside the forms widget selector when you are editing or creating .NET Core forms.
Sign up for our free beginner training. Boost your credentials through advanced courses and certification. Register for Sitefinity training and certification.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important