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
Nowadays you can access the Zend_View object via getView() method on Zend_Form classes:
// init your form
public function init()
{
$view = $this->getView();
$url = $view->url(array('module'=>'login','action'=>'login'));
$this->setAction($url);
...
}