Applying Class to Customer Zend Decorator -


i found code change standard dt , dd tags table tags zend_form_element. here code used:

       $element->setdecorators(array(    'viewhelper',    'errors',    array(array('data' => 'htmltag'), array('tag' => 'td', 'class' => 'element')),    array('label', array('tag' => 'td', 'class' => 'rightalign')),    array(array('row' => 'htmltag'), array('tag' => 'tr')) 

)); puts class name 'rightalign' on label tag instead of td. can't seem wrap head around these custom decorators can tell me how class name 'rightalign' on td surrounding label?

just add 1 more decorator

$element->setdecorators(array(     'viewhelper',     'errors',     array(array('data' => 'htmltag'), array('tag' => 'td', 'class' => 'element')),     'label',     array(array('labelwrap' => 'htmltag'), array('tag' => 'td', 'class' => 'rightalign')),     array(array('row' => 'htmltag'), array('tag' => 'tr')) )); 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -