[Zope] form and zpt question
Phillip Hutchings
sitharus at gmail.com
Sun Jan 16 16:35:44 EST 2005
> in case of an error, it re-renders the template with the error above. this
> works fine, but I want it to keep the values already entered in the form,
> not to give me a blank form. one way to specify them when calling the
> template from the script, but in large forms this will result in a very
> long parameter list. is there one object that holds all the values that I
> can pass back to the template?
The request details are in the request/form/itemname TALES expression,
so just put tal:attributes="value request/form/itemname | nothing" in
the tag. I can't tell you offhand how to check the values for things
like checkboxes, but I think it should be tal:attributes="checked
python:REQUEST.form['itemname'] == itemvalue", but I may be wrong.
--
Phillip Hutchings
http://www.sitharus.com/
sitharus at gmail.com / sitharus at sitharus.com
More information about the Zope
mailing list