views:

174

answers:

2

Hello to all. I have a Zend form with some elements like this :

http://i27.tinypic.com/ogj88i.jpg

I added all element using this way:

        $element = $this->CreateElement('text','lockerComb');
        $element->setLabel('Locker');
        $element->setAttrib('class','colorbox');
        $elements[] = $element;

        $element = $this->CreateElement('text','parking');
        $element->setLabel('Automobile / Parking');
        $element->setAttrib('class','colorbox');
        $elements[] = $element;

        $element = $this->CreateElement('text','customes');
        $element->setLabel('Customes Fields');
        $element->setAttrib('class','colorbox');
        $elements[] = $element;

But when i try to create element for file upload i fail..

A: 

Can you give more information about the exact nature of your fail?

It's fairly straight forwards to use. From the docs:

$element = new Zend_Form_Element_File('foo'); $element->setLabel('Upload an image:') ->setDestination('/var/www/upload');

Which is basic usage.

It's easy to get the file path wrong, but you should get an error if the path is wrong.

Supplying the code you are using would help!

firecall
A: 

Hi, I have written tutorial handling multiple file uploads with Zend Framework maybe it would help for you. Here is link to tutorial http://irmantasplius.blogspot.com/2009/08/zendform-multiple-file-uploads.html

Irmantas