Contoller: public function loginAction() { # assign the form to view $request = $this->getRequest(); $form = new WebForm; $form->addReqField('username', 'Username'); $form->addReqField('password', 'Password', false, '', WF_PASSWORD); # check if we have a POST request if ($request->isPost()) { if ($form->readAndValidate($request->getPost())) { $form->dbPrep(); $auth = Zend_Auth::getInstance(); $adapter = new MyAuthAdapter($form->dbGetFields()); $result = $auth->authenticate($adapter); if ($result->isValid()) { $this->_helper->redirector('index', 'index'); } else { $form->WFmsg = 'Invalid credentials provided. Please review login data.'; } } else { $form->WFmsg = 'Please review data and correct all highlighted fields below.'; } } # send wfEcho to view $this->view->wfEcho = new WFEchoKit($form); } View: