setName('login'); $username = new Zend_Form_Element_Text('username'); $username->setLabel('用户名') ->setRequired(true) ->addFilter('StripTags') ->addFilter('StringTrim') ->addValidator('NotEmpty'); $password=new Zend_Form_Element_Password('password'); $password->setLabel('密码')->setRequired(true); $remember=new Zend_Form_Element_Checkbox('remember'); $remember->setLabel('记住我'); $id = new Zend_Form_Element_Hidden('id'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('登录'); $submit->setAttrib('id', 'submitbutton'); $this->addElements(array($id, $username, $password, $remember, $submit)); $this->clearDecorators(); $this->addDecorator('FormElements') ->addDecorator('HtmlTag', array('tag' => '