$decorators2 = array(
        'ViewHelper',
        'Description',
        'Errors',
        array(
                array('data' => 'HtmlTag' ), array('tag' => 'span' ),
                array('Label', array('tag' => 'span' )),
                array(array('row' => 'HtmlTag' ),array('tag' =>'div','style' =>
'display:none;', 'class' => 'hiddenToReveal'))
        )
);

$var = $this->createElement($type, $name);
$var->setLabel($label);
$var->setRequired($required);
$var->setOptions($properties);  
$var->setDecorators($decorators2);
$this->addElement($var);

doing this in my form gives me this error
Catchable fatal error: Argument 4 passed to
Zend_Dojo_View_Helper_ValidationTextBox::validationTextBox() must be an
array, null given in
/home/gabriel/public_html/gomad_test/library/Zend/Dojo/View/Helper/ValidationTextBox.php
on line 64
Commenting out the setDecorators line makes everything work fine, but
obviously without my decorators, leaving that line in and commenting out the
others still displays the error, so it would seem to be my decorators, but I
can't see anything wrong with them. Please help.
-- 
View this message in context: 
http://www.nabble.com/Zend-Dojo-Form-adding-decorators-causes-error-tp24567348p24567348.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to