コード例 #1
0
 public function createAction()
 {
     // cria form
     $form = new C3op_Form_InstitutionCreate();
     $this->view->form = $form;
     if ($this->getRequest()->isPost()) {
         $postData = $this->getRequest()->getPost();
         try {
             if ($form->isValid($postData)) {
                 $form->process($postData);
                 $this->_helper->getHelper('FlashMessenger')->addMessage('The record was successfully updated.');
                 $this->_redirect('/register/institution/success-create');
             }
         } catch (Exception $e) {
             $this->view->form = $form;
             return $this->render('create');
         }
     }
 }