blueweb/nette-honeypot

Honeypot extension for Nette Forms

Installs: 36 340

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

pkg:composer/blueweb/nette-honeypot

v2.1.0 2025-10-06 18:29 UTC

This package is auto-updated.

Last update: 2025-10-08 10:16:46 UTC


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){ .... };