Why can\'t Zend_Form render my File element without errors?

Answer

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, like so:
$element
-
>setDecorators(array(
array('File'),
array('Errors')
));

All zend Framework 2 Questions

Ask your interview questions on zend-framework-2

Write Your comment or Questions if you want the answers on zend-framework-2 from zend-framework-2 Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---