ZF-2714: Form Image setAttrib() not rendering to html


Using setAttrib() to set class for Image Element dose not render to html (class="") however this method works for other form elements.

Also the helper in the Image attributes is formText. Shouldn't that be formImage?

$image = new Zend_Form_Element_Image('submitImage');
            ->setAttrib('class', 'button')
            ->setAttrib('foo', 'bar');


Outputs: array(3) { ["helper"]=> string(8) "formText" ["class"]=> string(6) "button" ["foo"]=> string(3) "bar" }


This behavior is with Zend_Form_Element_Image and not with any other (Text, Textarea, etc.), these all render the attrib to html.


Unsetting 'fix version' and 'fix version priority' until this issue is reviewed. Assigning to Matthew for review.

Image decorator is indeed not pulling in element properties to set element attributes; scheduling for GA release.

Fix committed to trunk and release branch