
scxcaptchaAjaxForm
Non-blocking numeric CAPTCHA (5 digits) for AjaxForm and FormIt. Easy for humans, harder for bots.

Non-blocking numeric CAPTCHA (5 digits) for AjaxForm and FormIt. Easy for humans, harder for bots. All names and classes use the scx_ prefix.
Documentation:
[[!ScxCaptchaAjaxForm]][[!AjaxForm?
&snippet=`FormIt`
&form=`tpl.AjaxForm.example`
&hooks=`ScxCaptchaAjaxFormHook,email`
&validate=`name:required,email:required:email,scx_code:required`
]][[!FormIt?
&hooks=`ScxCaptchaAjaxFormHook,email`
&validate=`name:required,email:required:email,scx_code:required`
]]
[[!ScxCaptchaAjaxForm]]MODX Revolution 2.8+ or 3.x
PHP 7.2+ (7.4 recommended)
GD + TrueType (for TTF font)
| Parameter | Default | Description |
|---|---|---|
| ttl | 1200 | Token lifetime (seconds). |
| includeAssets | head | How to load CSS/JS: head, inline, none. |
| render | 1 | Return CAPTCHA HTML (1) or only assets (0). |
Add &debug=1 to the URL: captcha.php?...&debug=1 — outputs debug data.
If you see Bad token, check: