use $this->element in the view script used for the display group
because it doesn't work. Although the same $this->element works
perfect in the view script used for the form itself.
On Fri, May 1, 2009 at 10:23 PM, Matthew Weier O'Phinney
<matthew@zend.com> wrote:
> -- Kostyantyn Shakhov <kshakhov@gmail.com> wrote
> (on Friday, 01 May 2009, 05:24 PM +0300):
>> 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]')),
>
> try
>
> array('ViewScript', array('viewScript' => '[view script]'))
>
> for that second element.
>
> The first argument is the name of the decorator, the second is an array
> of options to pass to that decorator.
>
>> 'Fieldset'
>> ));
>
> --
> Matthew Weier O'Phinney
> Project Lead | matthew@zend.com
> Zend Framework | http://framework.zend.com/
>
没有评论:
发表评论