This is true of all HTML forms (AFAIK). I would approach this by having both
forms submit to the same action (as you must), and using the redirector to
conditionally redirect to the desired ultimate action, something like:
MyController.php:
public function myFormAction()
{
if($this->getRequest()->getParam('button1'))
{
$this->_helper->getHelper('Redirector')->gotoUrl('http://othersite.com/',$this->getRequest()->getParams())
}
else
{
//do form stuff locally
}
}
Cheers,
Mark
sagittariidae wrote:
>
> Hey all,
>
> I might be going the wrong way about it but I am looking to include 2
> submit buttons on a form to choose from, one button posting to a script on
> another site and one posting back to an action in the same controller
> (with the ability to use the posted variables once there). Is this
> possible using Zend Form? Surely the form action has to be assigned before
> the form is actually created so that is why I am stumped. I suppose I
> could have the form post back to a single action that checks which button
> has been pressed but then how would I post the variables to the subsequent
> script, would I use Zend_Http_Client?
>
> Many thanks, Matt
>
--
View this message in context:
http://www.nabble.com/Multiple-submit-buttons-each-with-their-own-action-tp24150283p24163380.html
Sent from the Zend Framework mailing list archive at Nabble.com.