contributte / wordcha
Question-based captcha for Nette Forms
Fund package maintenance!
f3l1x
contributte.org/partners.html
Installs: 616 849
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 2
Open Issues: 0
pkg:composer/contributte/wordcha
Requires
- php: >=8.1
- nette/di: ^3.1.8
- nette/forms: ^3.1.14
- nette/http: ^3.2.3
- nette/utils: ^3.2.10|^4.0.3
Requires (Dev)
- contributte/phpstan: ^0.1
- contributte/qa: ^0.4
- contributte/tester: ^0.3
- mockery/mockery: ^1.5.0
Conflicts
- nette/component-model: <3.0.3
This package is auto-updated.
Last update: 2025-12-28 14:59:04 UTC
README
Website 🚀 contributte.org | Contact 👨🏻💻 f3l1x.io | Twitter 🐦 @contributte
Disclaimer
| ⚠️ | This project is no longer being maintained. |
|---|
| Composer | contributte/wordcha |
|---|---|
| Version | |
| PHP | |
| License |
About
Question-based captcha for Nette Framework / Forms.
Installation
composer require contributte/wordcha
Register extension:
extensions: wordcha: Contributte\Wordcha\DI\WordchaExtension
Configuration
At the beginning you should pick the right datasource.
Numeric datasource
wordcha: datasource: numeric
Question datasource
wordcha: datasource: questions questions: "Question a?": "a" "Question b?": "b"
Usage
use Nette\Application\UI\Form; protected function createComponentForm() { $form = new Form(); $form->addWordcha('wordcha') ->getQuestion() ->setRequired('Please answer antispam question'); $form->addSubmit('send'); $form->onValidate[] = function (Form $form) { if ($form['wordcha']->verify() !== TRUE) { $form->addError('Are you robot?'); } }; $form->onSuccess[] = function (Form $form) { dump($form['wordcha']); }; return $form; }
Example
Versions
| State | Version | Branch | PHP |
|---|---|---|---|
| dev | ^0.5 |
master |
>=8.1 |
| stable | ^0.4 |
master |
>=8.1 |
Development
This package was maintained by these authors.
Consider to support contributte development team. Also thank you for using this package.
