ZF-5292: CLONE -value of button is empty


I don't know why the code was added in the file,but the value of button always is empty.

file: library\Zend\Form\Decorator\ViewHelper.php :197


            if (stristr($type, 'button')) {
                $element->content = $element->getLabel();
                return null;


IT is my first issue to be reported so please forgive me for any faults I make Bug description:

Due to the above code tags in a form seem always have empty values. So isChecked() method always returns false since it uses getValue() method (Zend_Form_Element_Submit line 89). It does not matter if we escape the label or not.

I have the following button creation code. I wanted to check which button was clicked but neither $form->buttonSSL->isChecked() nor $form->button->isChecked() work. I made it working after putting manually (firebug) into rendered page into tags the following strings 'value="Send"' or ''value="Send using SSL"'. But they are not escaped!

    $button = $this->addElement('button', 'button',array(
    'decorators' => $this->_buttonElementDecorator,

    $buttonSSL = $this->addElement('button', 'buttonSSL',array(
    'label'=>'<span><em>Send using SSL</em></span>',
    'decorators' => $this->_buttonElementDecorator,



Closing this now, as this is > 1 year old, and the intention of this issue is very unclear to me. Prevent escaping is handled in ZF-9400, and the issues title is handled in ZF-5056.