-- jlevy <[email protected]> wrote
(on Tuesday, 13 January 2009, 12:29 PM -0800):
>
> form setup in my controller can't be any simpler:
>
> $form = new Zend_Form();
>
> $form->setName('oscarMayer');
>
> // set action, method, etc etc etc etc
>
> and in my view:
>
> <?= $this->form ?>
>
> I should have:
> <form name="oscarMayer" id="oscarMayer" action="..." method="..." enc ....
> blah.
>
> But I don't. There's no name attribute. It's missing. What gives?
>
> ZF1.7.2
Somebody raised an issue saying that the name attribute was invalid
according to the w3c, and I, unfortunately, did not do due diligence,
and stripped it out of the Form view helper. I'll be adding it back in,
as it clearly *is* part of the spec:
http://www.w3.org/TR/REC-html40/interact/forms.html#adef-name-FORM
That said, it's pretty pointless, as all current browsers will select
the DOM node based on the id in precedence over the name anyways.
--
Matthew Weier O'Phinney
Software Architect | [email protected]
Zend Framework | http://framework.zend.com/