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'); $reftype=new Zend_Form_Element_Radio('reftype'); $reftype->setRequired(true)->setLabel('文献类型')->setMultiOptions(array('0'=>'作者文献','1'=>'用户文献','2'=>'数据的参考文献','3'=>'作者要求的文献引用方式(多篇)'))->setValue(0); $submit = new Zend_Form_Element_Submit('submit'); $submit->setAttrib('id', 'submitbutton')->setLabel('发送'); $this->addElements(array($uuid,$reference,$link,$reftype,$submit)); } }