Python CGI and multiple forms on a web page

Maan Hamze MHAMZE at austin.rr.com
Mon Aug 20 04:18:15 CEST 2001


Thanks, this answers my question.  The issue was bugging me and I wanted to
be certain.
Thanks,
Maan

"Ignacio Vazquez-Abrams" <ignacio at openservices.net> wrote in message
news:mailman.998208330.20334.python-list at python.org...
> On Sun, 19 Aug 2001, Maan Hamze wrote:
>
> > I have a web page with many separate forms on it.  Each form is
associated
> > with a Post action that runs the same or a different Python CGI script.
I
> > am using the module cgi.py
> > For each script, I am using FieldStorage to access a form's elements.
> > I want to be sure of the following:
> > Does FieldStorage in the CGI script that is being run by submitting Form
A
> > (remember, the web page has many forms:  A, B, C etc....) apply strictly
on
> > Form A so that the Dictionary available to me has only the elements of
Form
> > A?
> > I know, the question sounds naive (and it may be), but I want to be
sure.
> > Thanks,
> > Maan
>
> The short answer:
>
> Only the data in the submitted form is sent to the server. The other forms
may
> as well not exist.
>
> The long answer:
>
> I dug around in the W3C's info about HTML, and although the above is
implied,
> it's never spelled out explicitly. Take a look if you want:
> http://www.w3.org/TR/html4/interact/forms.html#h17-13.
>
> --
> Ignacio Vazquez-Abrams  <ignacio at openservices.net>
>
>





More information about the Python-list mailing list