如何在Zend中删除“label”装饰器?

时间:2013-07-22 05:03:42

标签: php zend-framework zend-form

如何在Zend中为每个多个无线电表格元素删除“标签”装饰器?

DisableLoadDefaultDecorators & setSeparator 不会将其删除..

1 个答案:

答案 0 :(得分:0)

$form = new Zend_Form();
$form->addElement('radio', 'radio', array(
    'ignore'   => true,
    'label'     => 'Add new material'
));

$element = $form->getElement('radio');
$element->removeDecorator('label');