setName('Replace'); $pattern = new Zend_Form_Element_Text('pattern'); $pattern->setLabel('正则表达式PATTERN')->setRequired(true) ->addFilter('StringTrim'); $replace=new Zend_Form_Element_Text('replace'); $replace->setLabel('替换表达式') ->setRequired(true) ->addFilter('StringTrim') ->addValidator('NotEmpty'); $source=new Zend_Form_Element_Textarea('source'); $source->setLabel('测试XML数据')->setRequired(true)->setAttrib('rows',10); $test = new Zend_Form_Element_Submit('test'); $test->setLabel('测试'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('全部运行!(危险,请先进行测试)'); $this->addElements(array($pattern,$replace,$source,$test,$submit)); /* $this->clearDecorators(); $this->addDecorator('FormElements') ->addDecorator('HtmlTag', array('tag' => '