blueweb / nette-honeypot
Honeypot extension for Nette Forms
Installs: 26 756
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- nette/forms: ~3.0
README
Adds support for honeypot input in Nette Forms.
Installation
Best way to install this is using composer:
composer require blueweb/nette-honeypot
Then register extension:
extensions: honeypot: Blueweb\NetteHoneypot\HoneypotExtension
Usage
$form->addHoneypot($name, $caption, $errorMessage);
Parameter $name
should be something yummy for robot, like additional_email.
In $caption
you should write something for user, which for some reason has not this field hidden.
In $message
you may change default error message.
You can also specify your own error callback:
$honeypot = $form->addHoneypot('email'); $honeypot->onError[] = function($control){ .... };