[mod_python] How to know a form name

Graham Dumpleton graham.dumpleton at gmail.com
Sun Dec 21 14:57:04 EST 2008


2008/12/22 zayer <zayer at frikis.org>:
> Thanks you very much, Jason, but I prefer don't do that, all I want is
> know the form name.
> Forms have a 'name' attribute, so why I can't get it? FieldStorage or
> req should let me know it.
> Is that possible right know or not?

This has nothing to do with mod_python specifically. What is sent is
dictated by the RFC standards. You might therefore want to go read:

  http://www.w3.org/TR/html401/interact/forms.html

and stuff linked from that.

You may then find that the name of the form as a whole isn't sent.

Graham

> Jason Morgan wrote:
>> Have you tried providing a different action for each of the forms,
>> using your sever-side script to determine which action to take? E.g.,
>>
>> <!-- one -->
>> <form name="article" action="/process?act=1" method="post" > ... </form>
>> <!-- two -->
>> <form name="file" action="/process?act=2" method="post"> ... </form>
>>
>> Then your script can process the posted data depending on whether
>> act==1 or act==2 as provided by the client.
>>
>> HTH,
>>
>> ~ Jason Morgan
>>
>>
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>


More information about the Mod_python mailing list