18-12-2011

Zend Framework use HTML in Zend Form Label

To use HTML in a Zend Framework Form standard label you will first have to set the escape option in the relevant Label decorator to false. Like so:

$my_element =  $this->createElement('textarea', 'tags', array(
	'label' => 'Relevant keywords <span class="small">(comma-seperated)</span>'));
 
$my_element->getDecorator('Label')->setOption('escape',false);
 

Comments:

Your comment:

»

 

[x]