Reputation: 4951
This is my form generator function:
private function getAddArtistForm() {
$form = new Zend_Form();
$form->setAction("saveArtist");
$form->setMethod("post");
$form->setName("addartist");
...
}
public function newAction()
{
$form = $this->getAddArtistForm();
$this->view->form = $form;
}
I have also an action named saveArtistAction
:
public function saveArtistAction() {
...
}
But when I submit the form I get the following error:
Message: Action "saveartist" does not exist and was not trapped in __call()
Request Parameters:
array (
'controller' => 'artist',
'action' => 'saveartist',
'module' => 'default',
)
Upvotes: 2
Views: 3360
Reputation: 254926
What if you specify action
with hyphen:
'action' => 'save-artist',
?
Upvotes: 7