Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subscript or Superscript text within a Zend Form label

I would like to include subscript text in a Zend_Form_Element's label, and it doesn't seem to be working:

 $zend_form_element->setLabel('Label <sub>x</sub>');

Is there anything I can do to get it to output properly without having to manually write the form on the view page? Thanks for the help,

Dave

like image 723
Dave Morris Avatar asked Dec 23 '22 04:12

Dave Morris


1 Answers

I would say that best way is to get actual decorator from element and then set escape option, not to add new decorator:

$zend_form_element->getDecorator('Label')->setOption('escape',false);
like image 175
Matej Bartok Avatar answered Jan 05 '23 00:01

Matej Bartok