you have to use custom zend form decorator with your current form
you can use below code and link to add
Also if you want to change any more html changes you can make it as your custom.
Question
I need to display a number of addresses in a Zend_Form
. The nature of the form dictates I'd use Zend_Form_Element_Radio
. Each address is to be displayed as
Surname Name
Street No.
Zip City
But I can only acchieve
Surname Name Street No. Zip City
All the words are in one line.
Now, I read somewhere that I can tell the Label Decorator to render HTML tags like <br>
like so:
$element->getDecorator('Label')->setOption('escape', false);
But this only seems to work for the main label of the element, in this case Addresses
. So the <br>
-Tags are still displayed in my output now:
Surname Name<br>Street No.<br>Zip City
Does anybody know how to also get HTML to render in the individual input tags?
Solution
you have to use custom zend form decorator with your current form
you can use below code and link to add
Also if you want to change any more html changes you can make it as your custom.