setName('Reference'); $uuid = new Zend_Form_Element_Text('uuid'); $uuid->setLabel('UUID')->setRequired(true)->addValidator('NotEmpty') ->addFilter('StripTags') ->addFilter('StringTrim'); $reference=new Zend_Form_Element_Text('reference'); $reference->setLabel('文献') ->setRequired(true) ->addFilter('StringTrim') ->addValidator('NotEmpty'); $link=new Zend_Form_Element_Text('link'); $link->setLabel('URL(optional)') ->addFilter('StringTrim'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setAttrib('id', 'submitbutton')->setLabel('发送'); $this->addElements(array($uuid,$reference,$link,$submit)); } }