title: PHP-SYMFONY 3 (Why my form does not validate the request data?)
body: <p>Everything is in the title, I tried to submit &amp; validate a Symfony form but I can't.
  When I track the request I find that the form did not send any data in the POST parameters (No Request Content, No POST parameters)!
  My code is:</p>
  
  <p>in the Controller:</p>
  
  <pre><code> use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
   use Symfony\Component\Form\Extension\Core\Type\EmailType;
   use Symfony\Component\Form\Extension\Core\Type\FormType;
   use Symfony\Component\Form\Extension\Core\Type\PasswordType;
   use Symfony\Component\Form\Extension\Core\Type\ResetType;
   use Symfony\Component\Form\Extension\Core\Type\TextType;
  use Symfony\Component\Form\Extension\Core\Type\DateType;
  use Symfony\Component\Form\Extension\Core\Type\SubmitType;
  use Symfony\Bridge\Doctrine\Form\Type\EntityType;
  use Symfony\Component\Form\Test\FormBuilderInterface;
  use Symfony\Component\Form\Tests\Extension\Core\Type\CheckboxTypeTest;
  use Symfony\Component\Form\Tests\Extension\Core\Type\RepeatedTypeTest;
  use Symfony\Component\HttpFoundation\Request;
  use gestionBundle\Models\rememberMe;
  use Symfony\Component\HttpFoundation\Session\Session;
  
  class DefaultController extends Controller
   {
    /**
     * @Route("/login",name="login")
     */
    public function loginAction(Request $request)
    {
      $p=new compte();
      $form=$this-&gt;createFormBuilder($p)
  
          -&gt;add('mail',EmailType::class)
          -&gt;add('password',PasswordType::class)
          -&gt;add('login', SubmitType::class, array('label' =&gt; 'Login'))
          -&gt;getForm();
      $form-&gt;handleRequest($request);
  
  
      $em=$this-&gt;getDoctrine()-&gt;getManager();
      $repository=$em-&gt;getRepository('gestionBundle:compte');
  
  
      $session=$this-&gt;container-&gt;get('session');
      print_r($_REQUEST);
      if ($request-&gt;getMethod()=='POST'){
  
  
          $data = $request-&gt;request-&gt;all();
          $email = $data['form']['mail'];
          $password = $data['form']['password'];
  
  
  $user=$repository&gt;findOneBy(array('mail'=&gt;$email,'password'=&gt;$password));
  
         if($user)
         {
  
  
             $remember=$request-&gt;request-&gt;get('remember_me');
  
             if($remember=='remember me'){
  
                  $rememberMe=new rememberMe();
                 $rememberMe-&gt;setEmail($email);
                 $rememberMe-&gt;setPassword($password);
  
                 $session = new Session();
                 $session-&gt;start();
                 $session-&gt;set('rememberMe',$rememberMe);
             }
  
    return 
   $this&gt;render('gestionBundle:Default:index.html.twig',array('user'=&gt;$user));
         }
  
         else{
             $this-&gt;addFlash('alerte','LOGIN/PASSWORD INCORRECTE.. RESSAYER !');
  
  
         }
  
     }
      else{
  
          if ($session-&gt;has('rememberMe')){
              echo 'cas contarire 2';
              $rememberMe=$session-&gt;get('rememberMe');
              $email=$rememberMe-&gt;getemail();
              $password=$rememberMe-&gt;getpassword();
              $user=$repository-&gt;findOneBy(array('mail'=&gt;$email,'password'=&gt;$password));
  
              if($user)
              {
  
                  return $this-
       &gt;render('gestionBundle:Default:index.html.twig',array('user'=&gt;$user));
              }
          }
      }
      return $this-&gt;render('gestionBundle:Default:login.html.twig',array('fr'=&gt;$form-&gt;createView()));
  
  }
  }
  </code></pre>
  
  <p><strong>My Twig File:</strong> </p>
  
  <p>My TWIG file is all OK, because I have already succeeded to turning the function 'loginAction' without any problemes !.
  I don't know what's wrong in the 'loginAction' Function ?</p>
  
  <p>Thank you guys for your help.</p>