Hi, Im having trouble displaying a checkbox element with a custom viewscript,
what would the default viewscript for these elements look like.

atm, i have this in the form:

        $el = new Zend_Form_Element_MultiCheckbox('userSpecialization');
        $el->setLabel('Specialisation:');
        $el->addMultiOptions(App_Library::simpleArray('Specialization'));
        
        #$el->viewScript = '_element_multi.phtml'; // dosn't work!
        $el->setDecorators(array(array('ViewScript', array(
                'viewScript' => '_element_multi.phtml'
                        ))));

with this viewscript:

<div id="<?= $this->id ?>">
        <dt>
    <?= $this->formLabel($this->element->getName(),
                         $this->element->getLabel()) ?>
     </dt>
     <dd>                   
    <?= $this->{$this->element->helper}(
        $this->element->getName(),
        $this->element->getValue(),
        $this->element->getAttribs()
    ) ?>
    </dd>
    <?= $this->formErrors($this->element->getMessages()) ?>
    <div class="hint"><?= $this->element->getDescription() ?></div>
</div>

The label shows up, but no checkboxes. Whats up?
-- 
View this message in context: 
http://www.nabble.com/Viewscript-for-MultiCheckbox-tp23974968p23974968.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to