Zend Form Decorator - adding options to tag of an input Label -


I'm trying to get the following HTML output using the Zend_Form decorator:

  & Lt; & Gt; TR; & Lt; Td id = "to-label" ** class = "labelcell" ** & gt; & Lt; Label = "to" class = "required" & gt; From & lt; / Label & gt; & Lt; / Td> & Lt; Td> & Lt; Input type = "text" name = "to" id = "to" value = "" class = "text" & gt; & Lt; / Td> & Lt; / TR & gt;   

I am trying to add the class attribute and for example the inline style attribute on the attached tag of the label. In the above example, I would like to add the class = "labelcell "

decorator statement:

  $ to $$ this- & gt; Create Element ('Text', 'From', Array ('Values' = & gt; Array (array ('regex', false, '/ ^ [0-9] + / i')), 'required' = & Gt; true, 'label' = & gt; by '')); $ To- & gt; Setaib ('square', 'text'); ARI ('tag' = & gt; 'TD')), $ to-> Set ('label', 'array', 'description', 'description', 'errors', arrays (array ('data' = & gt; 'HtmlTag')) array ('tag' = & ; 'TD'), Array (Ar ('Row' = & gt; 'HtmlTag'), Array ('Tag' => gt; 'tr')));   

Do I have to achieve the attachment tag without extending Zend_Form_Decorator_Label to pass an additional option?

$ to-> set-decorators (array ('viewer', 'description', 'errors' Array ('data' = & gt; 'HtmlTag') array ('tag' = & gt; 'TD')), array ('label', array ('tag' = & gt; 'td' 'Class' = & gt; 'labelcell' 'tagClass' = & gt; 'YourClassNameHere' - this is what will be included in the negligent repeater)), array ('line' = & gt; 'HtmlTag'), array ('Tag' = & gt; 'tr')),

));

Comments