Zend Form Element Decorator
How to pr开发者_运维技巧epend the label of checkbox element through decorator?
$this->getElement('elementId')->addDecorator('Label'); ?
You can choose the placement as well:
$this->getElement('elementId')->addDecorator('Label', array('placement' => 'APPEND'))
Or do it through a general decorator setting:
'decorators' => array(
array('ViewHelper'),
array('Label', array('placement' => 'APPEND'))
)
Actually all information is available at http://framework.zend.com/manual/en/zend.form.standardDecorators.html
精彩评论