I'm building a form with a class extending Zend_Form.How can I add an img tag inside the form?I also need to add a class to it and align attribute
This is the final result I want to achieve:
<span class="myElement"><img src="myPath" align="middle" class="myClass"/>
<input type="text"></span>
I didnt find much about Zend_Form_Element_Image's documentation
thanks
Luca
Have in library/Application/Form/Element/Img.php
In application/view/helpers/FormImg.php
In your form:
Note: paths are subject to change in your particular application.
Hi you can create a custom element called "html"
Now you can call it:
For more info you can check this link:
Zend Framework: Insert DIV and Image in my form
Actually, you don't need a custom element to do that. You can use HtmlTag decorator and use the openOnly option.