/** Add an organisation * @access public * @return void */ public function addAction() { $form = new OrganisationForm(); $form->submit->setLabel('Add a new organisation'); $this->view->form = $form; if ($this->_request->isPost()) { if ($form->isValid($this->_request->getPost())) { $data = $form->getValues(); $data['secuid'] = $this->secuid(); unset($data['contact']); $insert = $this->getOrganisations()->add($data); $this->redirect(self::REDIRECT . 'organisation/id/' . $insert); $this->getFlash()->addMessage('Record created!'); } else { $form->populate($this->_request->getPost()); } } }