Re: QuickForm - missing $_FILES data

From: Date: Sat, 05 Apr 2003 10:53:42 +0000
Subject: Re: QuickForm - missing $_FILES data
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4656@lists.php.net to get a copy of this message
Bertrand Mansion wrote:
The easy solution would be to use: $form->addElement('file', 'imgfile'); instead of the createElement above. Otherwise, you will have to set the form attributes and the hidden field manually. Tell me if it worked.
Yes this worked, I changed both createElement() calls to addElement(). However now my submit button disappears when I validate the file and encounter errors. My error messages appear and the file dialog appears, but the submit button is gone. I am performing my own file validation, not using QuickForm as I probably should be. ( I presume this would mean instantiating the same Quickform and calling some methods. This functionality is fairly opaque to a newcomer.) Upon failure the script should add in error messages and then display the form again. But no submit. Branden PS - I had give up PEAR midweek, for lack of time and documentation/tutorials, but the rapid response on this list is very encouraging. -- +-----------------------------omphe.com-+ | | |Branden Faulls | | | | www.omphe.com | | brandenfaulls@omphe.com | | (+44) 773 440 8623 | +---------------------------------------+

« previous php.pear.general (#4656) next »