views:

36

answers:

2

Hi i am new to zendframework , i creating a form using Zend_Form(); i need to give a name for that form. i try the below but not works

ex1: $form = new Zend_Form(); $form->setMethod('post') ->setName('add_to_mail')// give name like this ->setAttrib('id', 'add_to_mail');

ex2:

$form = new Zend_Form(); $form->setMethod('post') ->setAttrib('name', 'add_to_mail'); // give name in attribute

Please any one help me .. Thanks in advance

+3  A: 
$form = new Zend_Form();
$form->setMethod('post');
$form->setName('MyFormName');

should do it

ArneRie
+3  A: 
$form = new Zend_Form(array(
    'name' => 'MyFormName'
));
Ololo