$this->addElement('select', 'types', array(
'label' => 'Some <span>html</span> label',
'required' => true,
'escape' => false,
'multiOptions => array(...)
);
Regards, Jurian
--
Jurian Sluiman
CTO Soflomo V.O.F.
http://soflomo.com
On Friday 22 Oct 2010 21:53:59 Thomas List wrote:
> I've been trying without any luck to add HTML to a Zend_Form. I started
> out with just trying to add a font to a label for one of the fields in my
> form:
>
> $this->addElement('select','types', array(
> 'label' => 'What type of home do you live in:',
> 'required' => true,
> 'multiOptions' => array( 'Existing Home' => 'Existing Home',
> 'New Construction' => 'New Construction', 'Condominium' => 'Condominium',
> 'Apartment' => 'Apartment',),));
>
>
> but when I add the html, Zend just renders it as text. I've read something
> about adding an esacape=>false to $decorators element or something, but I
> really am not sure how to do so. I would really appreciate some guidance
> on this, as I can't seem to find a straightforward example.
>
> Thanks,
> Thomas List
没有评论:
发表评论