CGI module: get form name

Tim Roberts timr at probo.com
Wed Apr 12 23:45:59 EDT 2006


"ej" <ejohnso9 at @earthlink.dot.net> wrote:
>
>I'm not seeing how to get at the 'name' attribute of an HTML <form> element.
>
>form = cgi.FieldStorage()
>
>gives you a dictionary-like object that has keys for the various named
>elements *within* the form...
>
>I could easily replicate the form name in a hidden field, but there ought to
>be some way to get directly at the form name but I'm just not seeing it. I
>looked in the os.environ() - don't see it there.

Nope, the form name is not transmitted as part of the HTTP request.  It
only exists for the convenience of the client-side code (like Javascript).
-- 
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-list mailing list