Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zend Framework Checkbox Decorators

What I am trying to accomplish is to have checkbox labels display after checkbox input fields (to the right of them).

I am using these decorators now:

private $checkboxDecorators = array(
    Label,
    array(array('data' => 'HtmlTag'), array('tag' => 'div', 'class' => 'checkbox')),
    'ViewHelper',
    array(array('row' => 'HtmlTag'), array('tag' => 'li')),
);

I have tried switching the Label and ViewHelper decorators but that did nothing. Any suggestions?

like image 971
Richard Knop Avatar asked Jul 21 '09 11:07

Richard Knop


1 Answers

$this->getElement('elementId')->addDecorator('Label', array('placement' => 'APPEND'))

the placement option can take APPEND or PREPEND as value

like image 182
smoove Avatar answered Sep 17 '22 13:09

smoove