Processing multiple forms in a cgi script

Jon Ribbens jon+usenet at
Fri Feb 19 13:15:33 EST 2016

On 2016-02-19, Jeremy Leonard <jrmy.lnrd at> wrote:
> I have a quick question regarding processing multiple forms. Most of
> my experience has been where there is just one form so the logic was
> pretty straight forward for me. My question revolves around how to
> handle multiple forms. I've seen that you can have an id for each
> form, but I'm unsure how to process that. Any info or a point/kick
> in the right direction would be appreciated.

Only one form can be submitted at once. To identify in your code
which one it was, either make the "action" attribute for each form
point to different URLs, or put a unique "name" attribute on each
submit button, or put an <input type="hidden"> in each form with
a unique name/value.

More information about the Python-list mailing list