QF, setting textarea value(?)
| From: | Markus | Date: | Sat, 04 Oct 2003 09:55:17 +0000 |
| Subject: | QF, setting textarea value(?) | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-8276@lists.php.net to get a copy of this message | ||
Hi!
I have a textarea and a file element in my form. I want to the content of
the text file that has been uploaded, to append to the content of the
textarea.
The only way I've managed to do this is by concatenating the contents of the
file directly to the _submitValues[...] variable of the QF-object. However,
I suppose this isn't a preferred way because I have to use a "private"
variable.
I've tried using the setValue() method of the textarea-object and
updateElementAttr() as well as the updateAttributes() method of the
QF-object. Unfortenately, all these seems to get overridden by the submitted
values when "reloading" the form.
By the way, the HTML textarea dosen't really have an 'value' attribute, has
it? Could that be the reason why updateElementAttr() and updateAttributes()
fails? Nonetheless, the quickform-element textarea does have an attribute
'value' that you can operate upon with setValue()/getValue(). This might be
a bit missleading maybe.
Any help to sort things out here is greatly appreciated! I might very well
be missing some fundamentals.
/Markus