View Helpers

In This Article

FormHidden

The FormHidden view helper can be used to render an <input type="hidden"> HTML form input. It is meant to work with the Hidden element.

Basic usage

use Zend\Form\Element;

$element = new Element\Hidden('my-hidden');
$element->setValue('foo');

// Within your view...

echo $this->formHidden($element);
// Result: <input type="hidden" name="my-hidden" value="foo">

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