On this page
Caution
The documentation you are viewing is for an older version of this component.
Switch to the latest (v3) version.
Elements
Submit
Laminas\Form\Element\Submit
represents a submit button form input.
It should be used with the FormSubmit view helper.
Basic Usage
This element automatically adds a type
attribute of value submit
.
use Laminas\Form\Element;
use Laminas\Form\Form;
$submit = new Element\Submit('my-submit');
$submit->setValue('Submit Form');
$form = new Form('my-form');
$form->add($submit);