|
|||
|
Hello all
,i'm trying to create a form with file upload using the Zend_Form component using ZF version 1.5.1. I created the Zend_Form_Element_File component which, for some reason, was missing (while Zend_Form_Element_File exists...) Here's my Zend/Form/Element/File.php : PHP Code:
PHP Code:
![]() My problem is that i can't figure out some things: 1. How to set custom form enctype? To handle file uploads i need to set it to 'multipart/form-data'. But i can't find anything to do such thing.. The only thing i know is that i should set some option(s) on the form decorator. 2. How to let Zend_Form to see file fields during form validation? As seen on the ZF programming reference manual, the form is validated using: PHP Code:
PHP Code:
![]() 3. How to write validators for file fields ? Maybe the method described in this post could be suitable for my needs..? I tried to explain the thing as best as i could. I'm not a native english-speaker, so please forgive me if i misspelled something. Any help is appreciated. Thank you all. |
|
|||
|
Quote:
![]() PHP Code:
![]() |
|
|||
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|