chitosystems/silverstripe-simple-captcha-field

Silverstripe spam captcha field

This package's canonical repository appears to be gone and the package has been frozen as a result.

dev-master 2016-02-11 14:29 UTC

This package is auto-updated.

Last update: 2020-10-21 11:20:56 UTC


README

silverstripe simple captcha field

Requirements

silverstripe/cms: 3.0+

Installation

composer require chitosystems/silverstripe-simple-captcha-field

Usage

<?php
	
	class ContactForm extends Form
    {
    
        function __construct($controller, $name)
        {                    
            $f = new FieldList();
            $f->push(TextField::create('Name'));
            $f->push(TextField::create('Email'));
            $f->push(SimpleCaptchaField::create('CaptchaField', 'Enter characters below:'));
            
            
            .......
            
       
            $requiredFields = new RequiredFields(array("Name","Email","CaptchaField"));