Reputation: 2859
1- How can I set 'name' attribute of 'form' html tag in Zend Form.
2- How can I set 'name' (not 'value' attribute) attribute of an element in Zend Form.
Thanks in advance
Upvotes: 1
Views: 3143
Reputation: 7485
In ZF1, you can call setName on the form. Which sets both the name and id of the form.
<?php
// Your form definition
$form->setName('blahForm');
echo $form->setView(new Zend_View);
?>
Outputs:
<form id="blahForm" name="blahForm">...</form>
Upvotes: 0
Reputation: 14184
$form->setAttrib('name', 'myForm');
$elt->setName('myElement');
Upvotes: 4