2009年5月1日星期五

[fw-mvc] ViewScript decorator fails for DisplayGroup

I'm trying to use a ViewScript decorator for DisplayGroup of a
Zend_Form. The view script contains form elements wrapped in a table.

It displays the group with the legend but omit the table html markup.
How could I fix it?

In the Form:

$this->addDisplayGroup(
array([fields]),
'[group_name]',
array( 'legend' => '[name] ')
);

$group = $this->getDisplayGroup('[group_name]');

$group ->setDecorators(array(
array('FormElements', array('viewScript' => '[view script]')),
'Fieldset'
));

没有评论: