ZF-5292: CLONE -value of button is empty

Description

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

code:

            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(
    'class'=>'button2',
    'label'=>'<span><em>Send</em></span>',
    'escape'=>false,
    'type'=>'submit',
    'decorators' => $this->_buttonElementDecorator,
    ));


    $buttonSSL = $this->addElement('button', 'buttonSSL',array(
    'class'=>'button1',
    'label'=>'<span><em>Send using SSL</em></span>',
    'escape'=>false,
    'type'=>'submit',
    'decorators' => $this->_buttonElementDecorator,
    ));

Regards

Comments

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.