我想要完成的是让复选框标签显示在复选框输入字段之后(在它们的右侧)。
我现在正在使用这些装饰器:
private $checkboxDecorators = array(
Label,
array(array('data' => 'HtmlTag'), array('tag' => 'div', 'class' => 'checkbox')),
'ViewHelper',
array(array('row' => 'HtmlTag'), array('tag' => 'li')),
);
我曾尝试切换 Label 和 ViewHelper 装饰器,但没有任何效果。有什么建议吗?
最佳答案
$this->getElement('elementId')->addDecorator('Label', array('placement' => 'APPEND'))
放置选项可以取APPEND或PREPEND为值
关于php - Zend Framework 复选框装饰器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1158671/