[Zope] Re: form and zpt question

Haim Ashkenazi haim at babysnakes.org
Sun Jan 16 17:12:03 EST 2005


On Mon, 17 Jan 2005 10:35:44 +1300, Phillip Hutchings wrote:

>> 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.
thanx, after playing a little with formulator, I found how to do that, but
it's always good to have another option :)

Bye
-- 
Haim




More information about the Zope mailing list