开发者

how to give name for Zend_Form

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_For开发者_如何学Cm(); $form->setMethod('post') ->setAttrib('name', 'add_to_mail'); // give name in attribute

Please any one help me .. Thanks in advance


$form = new Zend_Form();
$form->setMethod('post');
$form->setName('MyFormName');

should do it


$form = new Zend_Form(array(
    'name' => 'MyFormName'
));


can set the name by

$form->setName('registration');

can retreive the name by

$name = $form->getName();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜