This repository was archived by the owner on Jan 30, 2020. It is now read-only.
This repository was archived by the owner on Jan 30, 2020. It is now read-only.
Submit element gets label of preview element #61
Closed
Description
zend-form v2.8.0
If you define a form with elements and a submit button, the submit button gets a label rendered, with the label-name of the last added element.
$this->add([
'name' => 'identity',
'options' => ['label' => 'eMail'],
'attributes' => ['type' => 'text'],
]);
$this->add([
'name' => 'submit',
'attributes' => [
'value' => 'Submit Button',
'type' => 'submit'
],
]);
Unfortunately I could not track down this issue to provide a solution here. A workaround is to provide an options array for the submit-element with an empty label 'options' => ['label' => '']