durusmail: qp: Re: Form reset?
Form reset?
2007-10-18
2007-10-29
2007-10-29
2007-10-29
2007-10-29
2007-10-30
2007-10-30
2007-10-30
2007-10-30
2007-10-30
Re: Form reset?
2007-10-30
2007-10-30
2007-10-30
2007-11-02
2007-11-19
Re: Form reset?
David K. Hess
2007-11-02
On Oct 30, 2007, at 1:54 PM, David K. Hess wrote:
> On Oct 30, 2007, at 12:49 PM, Michael Watkins wrote:
>>     form_a = form_a_form(default, value, here)
>>     form_b = form_b_form(some, other, values)
>>
>>     if not form_b.is_submitted() or form_b.has_errors():
>>         if form_a.is_submitted():
>>             do_something_with_values(form_a)
>>             form_a = form_a_form(default, value, here)
>>         return  page('Edit',
>>                      form_a.render(),
>>                      form_b.render())

I just tested this with qp-2.0 and unfortunately, it does not work.
If you are using tokens to detect resubmitted forms (the default
behavior), then Form.render() will trigger the parsing of the form
via a check on the FormTokenWidget.

I'm beginning to think a new keyword on the Form constructor to
prevent looking at the incoming request might be the way to go?

Dave
reply