Re: Quickform suggestion

From: Date: Tue, 22 Apr 2003 20:45:43 +0000
Subject: Re: Quickform suggestion
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-15353@lists.php.net to get a copy of this message
Bertrand Mansion wrote:
$form->addElement('text', 'elName', 'Label:', array('size' => 40)); You can use as much attributes you want, they are parsed by HTML_Common. You could also do this, HTML_Common knows how to handle it: $form->addElement('text', 'elName', 'Label:', 'size=40 maxlength=40');
Hi Bertrand and Alexey, thanks for your answers. I have indeed missed the fact that it´s possible to pass more attributes along... thanks for pointing that one out. 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... Also, is there some method that simply returns the same data array that a callback function would receive as its parameter? Thanks for your patience, Markus

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