ZF-2717: setElementDecorators() changes display of Image Element to Text Element
Description
When using decorators a Image Element is rendered as a Text Element
$image = new Zend_Form_Element_Image('submitImage');
$image->setLabel('')
->setValue('test.gif')
->setAttrib('class', 'button');
$form->addElement($image);
$form->setElementDecorators(array(
array('ViewHelper'),
array('Errors'),
array('HtmlTag', array('tag' => 'dd')),
array('Label', array('tag' => 'dt')),
));
A quick look at the image attributes shows the helper is defined as fromText var_dump($image->getAttribs());
Outputs: array(2) { ["helper"]=> string(8) "formText" ["class"]=> string(6) "button" }
Comments
Posted by Matthew Weier O'Phinney (matthew) on 2008-03-05T10:11:33.000+0000
Need to add a $helper property to Image element to correct the issue.
Posted by Matthew Weier O'Phinney (matthew) on 2008-03-06T14:32:58.000+0000
$helper property set to 'formImage' in trunk and release branch.