Componette

Componette

download-cloud-line composer require ngatngay/nette-form-captcha

Nette Form Captcha

Simple Captcha

Install

composer require ngatngay/nette-form-captcha:dev-master

Setup

Config

extensions:
    captcha: NgatNgay\NetteFormCaptcha\DI\CaptchaExtension
    
captcha:
    autoload: yes
    type: question # or numeric
    questions:
        "Question 1?": "1"
        "Question 2?": "2"
       

Form

use Nette\Application\UI\Form;

public function createComponentForm()
{
    $form = new Form();
    
    $form->addCaptcha('captcha', 'Are you robot?');
    
    $form->addSubmit('send');
    
    $form->onSuccess[] = function (Form $form) {
        dump($form['captcha']);
    };
    
    return $form;
}

Render

{control form}

Example

image

image

No release at this moment. Try to create first one.

bar-chart-fill

Statistics

download-cloud-fill
3
star-fill
0
bug-fill
0
flashlight-fill
30d
price-tag-2-line

Badges

guide-fill

Dependencies

php (>=8.0)
nette/di (^3.0)
Componette Componette felix@nette.org