View Helpers

In This Article

FormCaptcha

Zend\Form\View\Helper\FormCaptcha will render a CAPTCHA as defined in a Captcha element.

Basic usage

use Zend\Captcha;
use Zend\Form\Element;

$captcha = new Element\Captcha('captcha');
$captcha->setCaptcha(new Captcha\Dumb());
$captcha->setLabel('Please verify you are human');

// Within your view...

echo $this->formCaptcha($captcha);

Found a mistake or want to contribute to the documentation? Edit this page on GitHub!