Beispiel #1
0
 public function getFormElementConfig()
 {
     return array("factories" => array("loginForm" => function ($sm) {
         $form = new \Form\Form\Login();
         $form->setInputFilter(new \Form\Form\LoginFilter());
         return $form;
     }));
 }
 public function exerciseThreeAction()
 {
     $form = new \Form\Form\Login();
     if ($this->request->isPost()) {
         $data = $this->request->getPost();
         $form->setData($data);
         if ($form->isValid()) {
             echo "<pre style='font-weight:bold'>";
             print_r($form->getData());
             echo "</pre>";
         }
     }
     return new ViewModel(array("myFormLogin" => $form));
 }