/** Add a decorative method */ public function adddecorationmethodAction() { $form = new DecMethodsForm(); $form->submit->setLabel('Add a new decoration method'); $this->view->form = $form; if ($this->getRequest()->isPost() && $form->isValid($this->_request->getPost())) { if ($form->isValid($form->getValues())) { $decs = new Decmethods(); $update = $decs->add($form->getValues()); $this->_redirect($this->_redirectUrl . 'decorationmethods'); $this->_flashMessenger->addMessage('A new decoration method has been created on the system!'); } else { $form->populate($form->getValues()); } } }