title: Access POST values in Symfony2 request object
body: <p>OK, this is a newbie question, but I can't find the answer anywhere.  In a controller in Symfony2, I want to access the POST value from one of my forms.  In the controller I have:</p>
  
  <pre class="lang-php prettyprint-override"><code>public function indexAction()
  { 
      $request = $this-&gt;get('request');
      if ($request-&gt;getMethod() == 'POST') {
          $form = $this-&gt;get('form.factory')-&gt;create(new ContactType());
          $form-&gt;bindRequest($request);
          if ($form-&gt;isValid()) {
              $name_value = $request-&gt;request-&gt;get('name');
  </code></pre>
  
  <p>Unfortunately <code>$name_value</code> isn't returning anything.  What am I doing wrong?  Thanks!  </p>