durusmail: qp: Form changes?
Form changes?
2007-04-08
2007-04-08
2007-04-08
Form changes?
David K. Hess
2007-04-08
On Apr 8, 2007, at 2:37 PM, David Binger wrote:
> On Apr 7, 2007, at 11:19 PM, David K. Hess wrote:
>> I was wondering if these changes might make sense and be useful:
>>
>> 1) Have Form.is_submitted check the request path to see if it
>> matches the form's action.
>>
>> 2) Add a new parameter to the Form constructor that allows you to
>> override the "_form_id" name for form tokens so you can manually
>> ensure they are all unique for a particular rendered page.
>>
>> My particular use case is submitting a form to a page where other
>> forms are being rendered but whose actions are at other URLs. The
>> _form_id field of the submitted form is conflicting with the
>> _form_id fields of the other forms. They behave as if the
>> submitted _form_id is theirs and all render "form already
>> submitted" errors. I use get_request().get_fields().clear() in
>> judicious locations as a workaround.
>
> The approach to this that we had in mind is to build each Form
> in the page with a different "prefix" keyword.  This should prevent
> is_submitted() from ever being true for more than one Form
> in the page (per request).  Would this approach work in your case?

Absolutely. I like it.

Dave

------
David K. Hess
Verscend Technologies, Inc.
dhess@verscend.com
214-684-5448





reply