This does not work either:

$this->addAttribs(
                array(
                                'id'          => 'myId',
                                'name'  => 'myName'
                )
);

----
Jeremy Brown
Senior Web Developer
Spear One
972.661.6038
www.spearone.com<http://www.spearone.com>

From: Jeremy Brown [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 10, 2008 3:25 PM
To: [email protected]
Subject: [fw-general] How to set name="" on form

I know I've seen this answer somewhere before on this list, but I cannot find 
it anywhere (archives or my own copies of the emails).

I have this code:

class forms_CodeIssueForm extends Zend_Form
{
        public function init()
        {
                // Metadata and Attributes
                $this->setMethod( 'post' );
                $this->setAttrib( 'id' , 'myId' );
                $this->setAttrib( 'name' , 'myName' );
        }
}

which outputs this:

<form id="myId" enctype="application/x-www-form-urlencoded" method="post" 
action=""><dl class="zend_form">
</dl></form>

I have tried $this->setName() and combinations of all of them, but I cannot get 
name="" to be output.  Any help is appreciated!!

I'm using ZF 1.6.0

Regards


----
Jeremy Brown
Senior Web Developer
Spear One
972.661.6038
www.spearone.com<http://www.spearone.com>

Reply via email to