Re: Quickform suggestion

From: Date: Wed, 23 Apr 2003 12:46:11 +0000
Subject: Re: Quickform suggestion
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-15380@lists.php.net to get a copy of this message
Greetings! > However, there´s one more issue I´ve just stumbled upon when trying > out the file upload feature - there doesn´t seem to be a built-in way > to retrieve the original name of a file. > > With normal text fields, I can do something like this to get the contents: > > $content = $form->getElementValue('myElement'); > > When I try the same on a file element, $content remains empty. Is this > a bug? I can of course access the values via $_FILES or use a callback > method to process the form data (which receives all values from > $_FILES as an array), but that seems quite cheesy... Well, it's not a 'bug' in a common sense of this word --- the getValue() method through which getElementValue() works is just not implemented in HTML_QuickForm_file. :] I think it makes sense to implement it, I'll probably do this soon. > Also, is there some method that simply returns the same data array > that a callback function would receive as its parameter? AFAIK, there is none.

« previous php.pear.dev (#15380) next »