(on Thursday, 04 September 2008, 09:42 AM -0500):
> I just updated my current project to 1.6 and noticed that the id of the
> fieldset now has the text "fieldset-" prepended to the name I assign to
> the display group:
>
> For example, in my form I have:
>
>
> $this->addDisplayGroup($displayGroupArray,
> 'contactUsForm',
> array(
> 'legend' => 'Contact Form',
> )
> );
>
> which now outputs:
>
> <fieldset id="fieldset-contactUsForm"><legend>Contact Form</legend>...</fieldset>
>
> Using 1.5.3 the id would only be id="contactUsForm". Bug?
No, intended behavior. This way we don't get conflicting ids between the
various elements used in decorators.
For example, if you have the following decorators on a form:
$form->setDecorators(array(
'FormElements',
'Fieldset',
'Form',
));
the old behavior would have assigned the same ID to both the <form> and
<fieldset> tags, which of course causes DOM issues. For 1.6.0, we
modified this behavior to assure that they have distinct IDs.
--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/
没有评论:
发表评论