I have trouble using decorators in combination with $logo=$this->createElement('file', 'logo')
I have a form in table style, everything worked quite fine until I wanted to add a file element. Here is the related part of my code (form class):
$logo=$this->createElement('file', 'logo')
->setLabel('logo:')
->setDestination(APPLICATION_PATH . "/../public/images/logos")
->addValidator('Count', false, 1)
->addValidator('Size', false, 1024000)
->addValidator('Extension', false, 'jpg,png,gif,jpeg');
$logo->setDecorators(array(
'ViewHelper',
'Description',
'Errors', array(array('data'=>'HtmlTag'), array('tag' => 'td',
'colspan'=>'2','align'=>'center')),
array(array('row'=>'HtmlTag'),array('tag'=>'tr')) //, 'closeOnly'=>'true'
));
I got an error message as following: Warning: Exception caught by form: No file decorator found... unable to render file element Stack Trace
Which could be the solution?