Details
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')),
));
<input type="text" name="submitImage" id="submitImage" value="test.gif" class="button">
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" }
Need to add a $helper property to Image element to correct the issue.