View Helpers

In This Article

FormTime

The FormTime view helper can be used to render an <input type="time"> HTML5 form input. It is meant to work with the Time element, which provides a default input specification for validating HTML5 time values.

FormTime extends from FormDateTime.

Basic usage

use Zend\Form\Element;

$element = new Element\Time('my-time');

// Within your view...
echo $this->formTime($element);
// Result: <input type="time" name="my-time" value="">

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