I'm looking at the examples at
http://devzone.zend.com/article/3450-Decorators-with-Zend_Form
In there, it shows a decorator setup to use table rows for each element.
This is almost what I need:
$element->setDecorators(array(
'ViewHelper',
'Errors',
array(array('data' => 'HtmlTag'), array('tag' => 'td', 'class' =>
'element')),
array('Label', array('tag' => 'td'),
array(array('row' => 'HtmlTag'), array('tag' => 'tr')),
));
However, I need one addition, "class=formLabel" within the label's <td>
cell. But, if I add 'class' => 'formLabel' to the Label line eg:
array('Label', array('tag' => 'td', 'class' => 'formElement')),
it puts it on the <label> tag, not the <td> tag I specifically told to wrap
it in.
What I'm getting:
<td><label for="name" class="formElement required">Name</label></td>
What I need:
<td class="formElement"><label for="name" class="required">Name</label></td>
Is there any simple way to do this?
---
Philip
[email protected]
http://www.gpcentre.net/