durusmail: quixote-users: Passing values to a form
Passing values to a form
[PATCH] form.Form.form_submitted
2003-09-28
2003-09-29
Passing values to a form
Mark Bucciarelli
2003-09-29
On Monday 29 September 2003 11:16 am, Anton Benard wrote:
> On Sun, Sep 28, 2003 at 09:54:34AM -0400, Mark Bucciarelli wrote:
> > On Saturday 27 September 2003 11:22 pm, Mark Bucciarelli wrote:
> > > However, I don't have any clever suggestions for how
> > > to do it differently.
> >
> > One approach would be to change the Form.form_submitted(request) to be a
> > bit smarter.  It could return true only if the form data includes info on
> > all widgets (expect checkboxes, which may not be included if there is no
> > value?)
>
> I don't think that is a reliable test. If I'm not mistaken multiple
> select widgets can have no value in the request when a form is
> submitted. This should not mean the form is not submitted, it means the
> form is submitted and nothing was selected.

Well ... couldn't that behavior be changed so that it always puts something in
the request.form?

I guess it depends on what you think the default behavor should be for a form.
My expectation was that rendering a form with default values would be handled
in a different spot that handling a user clicking a submit btton.

However, I can see your point--if a form has data passed to it in the
query_string, then you should handle this case the same place you handle all
data submitted to the form.

Regards,

Mark

reply