0
如何使用loadDefaultDecorators函数删除装饰器标签+ HtmlTag?Zend_Form - loadDefaultDecorators ::如何使用loadDefaultDecorators函数移除装饰器标签+ HtmlTag?
我的解决方法 - 请告诉我,如果我在执行工作良好或需要修改
class MyForm extend Zend_Form{
function init(){
//create form elements
......................................
}
public function loadDefaultDecorators() {
if ($this->loadDefaultDecoratorsIsDisabled()) {
return $this;
}
foreach($this->getElements()as $elem){
$elem->removeDecorator('Label')
->removeDecorator('HtmlTag');
}
return $this;
}
}
感谢