ZF-3643: $form->setAttrib('id', 'foo'); has no effect
Description
I assume that according to the manual $form->setAttrib('id', 'foo') should work and set the id="foo"; but it does't work, the result is always id="" (empty) $form->setName('foo') on the other hand seems to set the id instead of a name.
Comments
Posted by Slavius (slavius) on 2008-07-17T13:24:07.000+0000
Same here:
produces:
<
form id="logoutform" enctype="application/x-www-form-urlencoded" method="post" action="">
instead of:
<
form name="logoutform" id="formlogout" enctype="application/x-www-form-urlencoded" method="post" action="">
Posted by Matthew Weier O'Phinney (matthew) on 2008-07-17T13:29:19.000+0000
This is an incorrect diagnosis. If you echo getAttrib('id'), it will give the correct value. The issue is that the Form view helper is not using the ID attribute when generating the form tag, and instead always using the passed name.
Posted by Matthew Weier O'Phinney (matthew) on 2008-07-17T14:20:00.000+0000
Changing component to Zend_View
Posted by Matthew Weier O'Phinney (matthew) on 2008-07-18T15:02:24.000+0000
Fixed in trunk as of r10196
Posted by Matthew Weier O'Phinney (matthew) on 2008-07-22T08:38:17.000+0000
Re-opened due ot report on #zftalk.dev, and verified not working with current trunk (id is reported as empty string)
Posted by Matthew Weier O'Phinney (matthew) on 2008-07-22T08:40:27.000+0000
scheduling for 1.5.3.
Posted by Matthew Weier O'Phinney (matthew) on 2008-07-24T09:27:35.000+0000
Fixed in trunk and 1.5 and 1.6 release branches.