I have a form that I am trying to set the action for. I want to declare the action inside my form file (which extends Zend_Form) instead of in a controller or view, using a
if in my controller action:
$this->view->form = $form;
I will use view helper url to generate the form action url in my view script ( xxx.phtml):
$url = $this->url(array('controller'=>'my-controller-name',
'action'=>'my-action-name'),
'my-route-name'
);
$this->form->setAction($url);
echo $this->form;