1.

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’) ));

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:

You should use a File decorator instead of the ViewHelper for the file element, like so:



Discussion

No Comment Found