/** Add a new workflow stage */ public function addworkflowAction() { $form = new WorkflowForm(); $form->submit->setLabel('Add a new workflow stage to the system...'); $this->view->form = $form; if ($this->getRequest()->isPost() && $form->isValid($this->_request->getPost())) { if ($form->isValid($form->getValues())) { $workflows = new Workflows(); $insert = $workflows->add($form->getValues()); $this->_redirect($this->_redirectUrl . 'workflows'); $this->_flashMessenger->addMessage('New worklfow created'); } else { $form->populate($form->getValues()); } } }