Have you checked out the following:
Trigger custom action when setting button pressedTrigger custom action when setting button pressed
Seems like a similar situation.
Also, have you thought about having the form submit to itself and watching for the $_REQUEST
variables?