Hi,
I'm sure this is really simple, but I'm stumped right now.
Basically, I want a form with multiple buttons to be processed by a
single handler, but run sections of handler code conditionally
depending on which button was pressed.
class MyForm(TableForm):
class fields(WidgetsList):
fooButton = SubmitButton(attrs={'value':'foo'})
barButton = SubmitButton(attrs={'value':'bar'})
new_my_form = MyForm("new_my_form")
Then:
def post(self, *arg, **kw):
if kw['submit'] == 'foo':
do_something()
if kw['submit'] == 'bar':
do_something_else()
Is this possible?
Jamie
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---