def GET(self):
return """<form action="" method="post">
<input type="submit" name="form_action" value="foo"/>
<input type="submit" name="form_action" value="bar"/>
</form>
def POST(self):
i = web.input(form_action='foo')
if form_action == 'foo':
# Do foo button action
else:
# Do bar button action
Hope that helps.
Cheers,
Justin
On Mar 13, 10:13 am, "W. Martin Borgert" <[email protected]> wrote:
> Hi,
>
> does somebody have an example for a webpy POST method with
> more than submit buttons in the form?
>
> TIA!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---