title: Cant send contact form in Symfony 2
body: <p>I trying to send contact form in Symfony2, but i have the error: </p>
  
  <pre><code>Variable "form" does not exist in VputiMainBundle:Main:contact.html.twig at line 20
  </code></pre>
  
  <p>Here is my controller:</p>
  
  <pre><code>public function contactAction(Request $request)
  {
      $form = $this-&gt;createForm(new ContactType());
      $formView = $form-&gt;createView();
      $form-&gt;handleRequest($request);
  
      if ($form-&gt;isValid()) {
          $message = \Swift_Message::newInstance()
              -&gt;setSubject($form-&gt;get('subject')-&gt;getData())
              -&gt;setFrom($form-&gt;get('email')-&gt;getData())
              -&gt;setTo('mail.com.deu')
              -&gt;setBody(
                  $this-&gt;renderView(
                      'VputiMainBundle:Main:contact.html.twig',
                      array(
                          'ip'      =&gt; $request-&gt;getClientIp(),
                          'name'    =&gt; $form-&gt;get('name')-&gt;getData(),
                          'message' =&gt; $form-&gt;get('body')-&gt;getData()
                      )
                  )
              );
          if ($this-&gt;get('mailer')-&gt;send($message)) {
              $this-&gt;get('session')-&gt;getFlashBag()-&gt;add('message_send', 'thanks!');
          } else {
              $this-&gt;get('session')-&gt;getFlashBag()-&gt;add('send_error', 'error!');
          }
      }
  
      return $this-&gt;render('VputiMainBundle:Main:contact.html.twig', array('form' =&gt; $formView));
  }
  </code></pre>
  
  <p>Where is my problem, what I doing wrong?</p>