dravencms / captcha
Captcha implementation for dravencms
Package info
Type:dravencms-package
pkg:composer/dravencms/captcha
Requires
- php: >=8.1
- dravencms/captcha-implementation: >=0.0.1
- dravencms/icaptcha: >=0.0.1
- nette/di: ^3.1.8
- nette/utils: ^4.0.3
This package is auto-updated.
Last update: 2026-08-24 22:38:39 UTC
README
Provider-independent CAPTCHA integration for Nette Forms. It selects an installed CAPTCHA provider and adds the addCaptcha() extension method to every Nette form container.
Installation
Install the integration and one implementation:
composer require dravencms/captcha dravencms/recaptcha
Available implementations in this repository set include:
dravencms/recaptchafor Google reCAPTCHA.dravencms/antiq-captchafor a session-backed image CAPTCHA.
Configuration
Point the CAPTCHA manager at the selected provider service:
dravencms.captcha: provider: @dravencms.recaptcha.provider
The exact service prefix follows the extension name used when registering the provider package.
Form Usage
After DI initialization, forms and containers expose addCaptcha():
$form->addCaptcha( name: 'captcha', label: 'Verification', required: true, message: 'Please complete the verification.', );
The field is validated by the configured provider and omitted from returned form values. Use only one dravencms/captcha-implementation provider in an application unless you configure the desired service explicitly.
License
This package is licensed under the LGPL-3.0 license.