Witam,
Mozecie mi wytlumaczyc jak mozna wyswietlic formularz np. logowania lub czego kolwiek w np. prawej kolumnie layoutu zachowujac walidajcje i wszystkie inne funkcje zwiazane z Zend Form.
Pozdrawiam
$request = $this->getRequest(); $form = new Application_Form_Login(); if ($this->getRequest()->isPost()) { if ($form->isValid($request->getPost())) { return $this->_helper->redirector('index'); } } $this->view->form = $form;
$this->setMethod('post'); $this->setAction('/auth/'); // Add an email element 'label' => 'Email:', 'required' => true, 'EmailAddress', ) )); // Add a login element 'label' => 'Password:', 'required' => true, )); // And finally add some CSRF protection 'ignore' => true, )); // Add the submit button 'ignore' => true, 'label' => 'Login', ));
//layuot.phtml { $this->loginForm = new Application_Form_Login(); } // kontoroller $this->view->loginForm = $form;
$request = $this->getRequest(); $form = new Application_Form_Login(); if ($request->isPost()) { if ($form->isValid($request->getPost())) { return $this->_helper->redirector('index'); } } $this->view->loginForm = $form;