Skip to content

ngatngay/nette-form-captcha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages