Zdefiniowałem wszystkie typy pól, ładnie juz sie wyświetla z bootstrape, ale gdy chce zobaczyć czy faktycznie zapisuje dane z formularza, to po kliknięciu buttona, strona sie odświeża i w pasku adresu przekazane są dane z formularza.. Doszedłem do wniosku ze musi być problem z metodą, ale nie wiem jak ją zmienić..
tutaj controler:
public function registerAction(Request $Request){ $form = $this ->createForm( new rejestracjaType()); $form->handleRequest($Request); if($Request->isMethod('POST')){ if($form->isValid()){ $savePath = $this->get('kernel')->getRootDir().'/../web/uploads/'; $testForm = $form->getData(); $testForm = 'Zapisano dane formularza!'; } }else{ $testForm = 'NIMA'; } 'form' =>$form->createView(), ); }
a Tutaj typ:
{ $builder 'label' => 'Nazww użytkownika')) 'label' => 'Email')) 'label' => 'Hasło')) 'label' => 'Powtóż hasło')) 'label' => 'Zarejsetruj!' )); }
Po uruchomieniu strony wyświetla sie nima, wiec to musi być coś z method.... Jakieś pomysły?