Skip to content
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
@Moongazer

Description

@Moongazer

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'
    ],
]);

zend-form-issue
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' => '']

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions