-- Teemu Välimäki <[EMAIL PROTECTED]> wrote
(on Thursday, 10 April 2008, 07:43 PM +0300):
> On Thursday 10 April 2008 19:23:36 Matthew Weier O'Phinney wrote:
> > If the decorator already exists, you can set the options on it by
> > pulling it from the form/group/sub form:
> 
> It does already exist.
> 
> >     $decorator = $form->getDecorator('fieldset');
> >     $decorator->setOption('id', 'foo')
> >               ->setOption('class', 'foo');
> 
> Doesn't this set the options to the fieldset tag and not to the legend tag?
> 
> What I've tried, is $form->getDisplayGroup('fooFieldset') and somehow from 
> there set id and class.. but this of course hasn't worked out.

Sorry, yes -- the id and class apply to the fieldset, not the legend.
Zend_View_Helper_Fieldset creates the legend in the fieldset, and at
this time has no mechanics to give it separate attributes. If you'd like
to see such a feature, you have two options:

  * File a feature request (will take time)

  * Extend the Fieldset view helper to allow processing additional
    attributes for the legend. Then pass those attributes via the
    decorator options.

-- 
Matthew Weier O'Phinney
Software Architect       | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to