On this page
Caution
The documentation you are viewing is for an older version of this component.
Switch to the latest (v3) version.
View Helpers
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 Laminas\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">