public function formAction() { $f = new Application_Form_Test(); if ($this->_request->isPost()) { if ($f->isValid($this->_request->getParams())) { if ($f->imagen->receive()) { $this->_helper->FlashMessenger('Todo ok'); $this->_redirect('/test/form'); } } $this->view->values = $f->getValues(); } $this->view->f = $f; }
public function agregarAction() { $form = new Application_Form_Test(); if ($this->getRequest()->isPost()) { if ($form->isValid($this->_getAllParams())) { $model = new Application_Model_Tests(); $model->save($form->getValues()); return $this->_redirect('/tests/'); } } $this->view->form = $form; }