Zend Form Decorators Error in Table
I am using the next dec开发者_如何学运维orators for my input. I want to make this as table.
$this->setDecorators(array('ViewHelper','Errors',
array(array('data'=>'HtmlTag'), array('tag' => 'td')),
array('Label', array('tag' => 'td')),
array(array('row'=>'HtmlTag'),array('tag'=>'tr'))
));
But after form validation Errors showing not in td. How can I do this? I want to make the next makeup:
<table>
<tr>
<td>Lable</td>
<td>Input</td>
<td>Error</td>
</tr>
</table>
$this->setDecorators(
array(
'ViewHelper',
array(
array(
'data'=>'HtmlTag'
),
array(
'tag' => 'td'
)
),
array(
'Label',
array(
'tag' => 'td'
)
),
array(
'Errors',
array(
'tag' => 'td'
)
),
array(
array(
'row'=>'HtmlTag'
),
array(
'tag'=>'tr'
)
)
)
);
精彩评论