Google News
logo
Zend framework - Interview Questions
Why can't Zend_form render my file element without errors?
The file element needs a special file decorator, which is added by default. When you set your own decorators for file elements, you delete the default decorators. For example :
$element->setDecorators(array(  
array('ViewHelper'),  
array('Errors')  
));  
You should use a File decorator instead of the ViewHelper for the file element, as shown below :
$element->setDecorators(array(  
array('File'),  
array('Errors')  
));​
  
Advertisement