Appendix: Using the CAPTCHA Element Tag
You can implement a CAPTCHA validator to provide an additional layer of security to your application. CAPTCHA is a system that uses distorted images to determine whether a user is human or an automated program. When a user accesses a page containing this element, they will have to complete the test correctly to be able to continue.
For more information about CAPTCHA, refer to www.captcha.net.
This element tag has the following default syntax:
<%# CAPTCHA(
Keyword
AutoPostBack
InputLabel
ErrorMessage
Hint) %>
The following parameters are required:
Parameter | Description |
---|---|
Keyword | A string containing the name of a KnowledgeKube keyword. This parameter is required when using the element in a model, as the outcome will need to be passed to this keyword to be used for validation. |
The following parameters are optional:
Parameter | Description |
---|---|
AutoPostBack | A Boolean to determine whether the page will perform a postback or not when the user submits their response. |
InputLabel | A string that appears above the input text field, and is typically an instruction to the user, such as "Submit response below". |
ErrorMessage | A string that will appear if the user submits an incorrect answer. |
Hint | A string that appears below the input text field, to assist the user, such as "Response is not case sensitive". |
An example of a complete CAPTCHA tag is as follows:
<%# CAPTCHA(
Keyword="VARCaptchaResult"
AutoPostBack="false"
InputLabel="Image Text"
ErrorMessage="The characters entered did not match the characters in the image."
Hint="Letters are not case sensitive") %>