[Zope] Python, Pre-Fill Form Fields

Paul Winkler pw_lists at slinkp.com
Mon Feb 23 16:06:23 EST 2004


On Mon, Feb 23, 2004 at 03:49:25PM -0500, AdvertisingDept wrote:
> thanks Paul, you're very patient.
> 
> 
> Unfortunately, I still can't set the FORM section of the REQUEST.
> 
> I keep getting the error:
>    'dict' object has no attribute 'set'

Oops. I don't muck with request.form directly very much,
as you may have noticed ;-)

does it work if you treat it like a plain python dict?
(which apparently it is).

#Get the HTML request object
myrequest = container.REQUEST
 
#preset the request field
myrequest.form['aformfield'] = 'a value'
 
#go to the form
return context.theform(REQUEST=myrequest)

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's GARGANTUAN GUITAR OF CHRISTMAS!
(random hero from isometric.spaceninja.com)



More information about the Zope mailing list