Captcha Usage

This is a user-contributed Extra. If you find issues or would like more info or help, please contact the author.

FormLister can use modified Evo captcha and Google reCAPTCHA by default.

Set the "captcha" parameter value with the name of captcha files folder (located at assets/snippets/FormLister/lib/captcha/) to enable it:


The parameter named "captchaParams" contains an array of captcha settings. For example:


The field name to get captcha value from user is defined by the "captchaField" parameter ("vericode" by default). Validation rule for this field is created automatically.

To output captcha in form template use [+captcha+] placeholder.



Property Description
width and height width and height of a captcha image (100 and 60 by default);
inline output format. If it's 1, then [+captcha+] placeholder contains an image in base64-format. If it's 0, then placeholder contains the link to connector.php file, which generates captcha image. Default value - 1;
connectorDir path to the folder containing connector.php file, if "inline" parameter is set to 0. Default value - assets/snippets/FormLister/lib/captcha/modxCaptcha/;
errorEmptyCode error message, if user doesn't enter captcha.
errorCodeFailed error message, if user enters wrong value.


Uses Google reCAPTCHA V2.

To be able to use Googles' reCAPTCHA you must include the following script in the page where you wish to display it:

<script src="" async defer></script>

The value of the "captchaField" parameter must be set to "g-recaptcha-response" (view the official documentation).


Property Description
secretKey, siteKey keys to access reCAPTCHA api;
size, theme, badge, callback, expired_callback, tabIndex, type view the official documentation;
errorCodeFailed error message if captcha validation failed.



Suggest an edit to this page.