There appears to be a limitation in Zend_Form where you can set the "id" attribute but not the "name" attribute on the field itself. Elements you can set the name, but not the form.
I've tried several things to do this and they all result in just the "id" attribute getting set:
$this->setName('myForm');
this results in HTML that looks like this
<form id="myForm" enctype="application/x-www-form-urlencoded" action="" method="post"><table>
Other attempts yielded the exact same result. Such as:
$this->setAttrib('name', 'myForm'); <---- sets the "id", not the "name".
$this->setAttribs(array('id' => 'myForm', 'name' => 'myForm' )); <---- sets the "id", not the "name".
Seth Atkins
没有评论:
发表评论