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

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

PostgreSQL 9.x - pg_read_binary_file & inserting files into bytea -

jtree - comparing two TreeNode (or DefaultMutableTreeNode) objects in Java Comparator -