Statistics
3571
1
0
89d
Badges
Dependencies

SeznamCaptcha

Build Status Code coverage Downloads this Month Downloads total Latest stable HHVM Status

Seznam Captcha for Nette Framework / Forms.

Discussion / Help

Join the chat

Install

composer require minetro/seznamcaptcha

Extension

extensions:
	captcha: Minetro\SeznamCaptcha\DI\SeznamCaptchaExtension

By default is auto: on and method: http, you can disable it and bind addCaptcha to your forms by yourself.

captcha:
	auto: off # on | off
	method: xmlrpc # http | xmlrpc

Usage

captcha

Just register an extension and keep auto argument as it is.

use Nette\Application\UI\Form;

protected function createComponentForm()
{
    $form = new Form();

    $form->addCaptcha('captcha')
        ->setRequired('Are you robot?');

    $form->addSubmit('send');

    $form->onSuccess[] = function (Form $form) {
        dump($form['captcha']);
    };

    return $form;
}

Rendering

Automatic

{control form}

Manual

It needs a CaptchaContainer consists of 2 inputs image and code.

<form n:name="form">
    {input captcha-image}
    {input captcha-code}
</form>

Thanks for testing, reporting and contributing.

  • 0.2 v0.2

    Changes:

    • tiny typos in examples
    • fix binding bug
  • 0.1 v0.1

    First bump!

Is this addon outdated? Did you find an issue? Please report it.

Componette Componette admin@componette.com