In my form i need this:
<li class ="af_title"><div>Contact form</div></li>
I understand that if I need for example a text field - then I'd just create Zend_Form_Element_Text and wrap HtmlTag decorator around it - right?
questions:
1) how would I generate div form element so I can wrap decorator around it?
2) mmm. - how would I set content of said element to be "Contact form"?
Thanks:)
To wrap your Contact form around
div
which is inside<li class ="af_title">
you can do as follows:EDIT:
I see that you speak of div form element. Such element does not exist, but you could easily create it. For this you need two things: new form element (i.e. div element) and a form view helper that would take care of generation of the html. I allowed myself to prepare simple examples of these two elements to show what I mean:
Div.php in APPLICATION_PATH . /forms/Element:
FormDiv.php in APPLICATION_PATH . /views/helpers:
Having this, you can just add the div form element to any form element in their init() method as follows: