2010年10月22日星期五

[fw-mvc] Forms and HTML

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

没有评论: