[Zope] Getting value from a form field
Chris Withers
chrisw@nipltd.com
Tue, 16 May 2000 10:37:16 +0100
Hi Bart :-)
Bart Holthuijsen wrote:
> <INPUT TYPE="file" NAME="filenaamXML:string" SIZE="25">
Take this :string off the end for starters. An input type of "FILE"
causes a binary file to be uploaded. Zope handles this by turning it
into a FileUpload object. Trying to parse it as a string can't be
helping matters ;-)
> now how do I get the value that is filled in in the field?
> In my convuplmethod method I have:
>
> <dtml-var "REQUEST.form['filenaamXML']">
>
> But this returns the contents of the file, and all I want is the path.
You will only get the path from certain browsers, IE I think.
If you want the file name, it can be displayed with the following:
<dtml-var "REQUEST.form['filenaamXML'].filename">
If you need any more help, it might be useful if you explain what you're
trying to do overall :-)
HTH,
Chris