I started using Zend forms, how can i have :
<button id="show" type="button">
<img width="18" height="18" alt="Calendar" src="assets/calbtn.gif">
</button>
using Zend_Form_Button.
I tried this but it didnt work :
$btn = new Zend_Form_Element_Button('show');
$btn->removeDecorator('DtDdWrapper');
$btn->setLabel(' ');
$btn->addDecorator('Label', array('HtmlTag',array('tag'=>'img','placement'=>'append','src'=> 'assets/img.gif')));
You could always use css to set a background for the button and then use
And in css
I am not sure how you could do what you want without creating a new custom Zend_Form_Element. But There is also Zend_Form_Element_Image that probably does exactly what you want.