Configuring Captcha



CAPTCHA stands for the “Completely Automated Public Turing test to tell Computers and Humans Apart”. 

Captchas are tools that are used to differentiate between real users and automated users, such as bots. Captchas provide challenges that are difficult for computers to perform but relatively easy for humans. For example, identifying stretched letters or numbers, or clicking in a specific area. A Captcha is a type of challenge-response test used in computing to determine whether the user is human. Captcha is used mostly for security reasons, Captchas also serve as a benchmark task for artificial intelligence technologies.

Captcha in Znode

In Znode, Captcha is implemented for the Login page and Contact Us pages whose visibility is dependent on the Store level global attribute values.

In Znode, plain captcha is implemented using CaptchaMvcv4.0 library. CaptchaMvcv4.0 allows users to easily change or extend the current implementation of the captcha.

Configuring a Captcha

Znode database default script consists of a data script for the Global attribute required for the captcha implementation.
There are two global attributes “Is Captcha Required” and “Is Captcha Required For Login” available in the default script that is associated with global attribute group “Captcha” which is in turn associated to global attribute family “Store”

Enabling/Disabling Captcha for web store:

Navigate to: Stores > Additional Attributes > Captcha tab

Admin users have two options from where Captcha settings can be enabled and disabled.
When the value of “Is Captcha Required for Login” is set as Yes and Store Settings are published, the Captcha is enabled for the “Login” page.

When the value of “Is Captcha Required” is set as Yes, and Store Settings are published, the Captcha is enabled on the “Contact Us” and “Feedback Form” pages.    

Implementing Znode Captcha feature on any other pages

In the Webstore theme folder, there is a container file/view that generates all the forms (Webstore--> Views --> Themes --> <ThemeName>--> Views--> FormBuilder ) FormTemplate.cshtml. In this file, there is a "foreach" loop that creates the controls for the forms and associates attribute configured in the Form, once this is executed the div for captcha can be included.

@foreach (var ctrl in Model.Attributes) { //Add custom captacha logic }
@foreach (var ctrl in Model.Attributes) { //Add custom captacha logic }

In the FormTemplate you can reference the FormBuilderAttributeGroupViewModel, you can reference the FormCode

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.