Hello,

 

I'm trying to figure out the best way to redirect after a form is processed
and found valid via processAjax.  Here is my controller code:

 

public function addAction() {       

            $form = new App_Forms_Users_Add ();

            if ($this->getRequest ()->isXmlHttpRequest () &&
$this->getRequest ()->isPost ()) {

                  $response = $form->processAjax ( $this->getRequest
()->getPost ());

                  if ($response == 'true') {                

                        $formData = $form->getValues ();

                        $last_id = $this->UserModel->add ( $formData );


                        $this->_redirect('/backend/users/index');


                  } else {

                        $this->_helper->json ($response);


                  }

            }           

            $this->view->form = $form;

      

      }

 

Everything works just fine except the redirect.  Can I not redirect after a
post?  Any help would be appreciated.

Reply via email to