I've figured it out.
PHP Code:
function addAction() { $form = new Zend_Form; $form->setAction('/admin/group/process') ->setMethod('post'); $form->setAttrib('class', 'admin_form'); $group = new Zend_Form_Element_Text('group'); $form->addElement($group); $group->setLabel('Group'); $form->addDisplayGroup(array('group'), 'groups', array("legend" => "Group Add")); $submit = new Zend_Form_Element_Submit('submit'); $form->addElement($submit); //$submit->setLabel('Save'); $form->submit->setValue("Save"); $this->view->body = $form; }
You use $form->addDisplayGroup and then pass in an array of options at the end of the call.
|