View Helpers

In This Article


The FormColor view helper can be used to render a <input type="color"> HTML5 form input. It is meant to work with the color element.

Basic usage

use Zend\Form\Element;

$element = new Element\Color('my-color');

// Within your view...
echo $this->formColor($element);


<input type="color" name="my-color" value="">

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