title: Symfony 4 forms - Variable form does not exist
body: <p>Using Symfony 4 to build a support ticket form:</p>
  
  <p><strong>Created route and functions in page controller</strong></p>
  
  <pre><code>/**
   * @Route("/support/ticket")
   */
  public function ticket(){
      return $this-&gt;render('support/ticket/ticket.html.twig');
  }
  public function new(Request $request)
  {
      // creates a Ticket and gives it some dummy data for this example
      $ticket = new Ticket();
  
      $form = $this-&gt;createFormBuilder($ticket)
          -&gt;add('category', ChoiceType::class, array(
              'choices' =&gt; array(
                  'ROMAC eHR' =&gt; 1,
                  'ROMAC Website' =&gt; 2,
                  'ROMAC Guide' =&gt; 3,
              )
          ))
          -&gt;add('comment', TextareaType::class)
          -&gt;add('save', SubmitType::class, array('label' =&gt; 'Submit Ticket'))
          -&gt;getForm();
  
      $form-&gt;handleRequest($request);
  
      if ($form-&gt;isSubmitted() &amp;&amp; $form-&gt;isValid()) {
          // $form-&gt;getData() holds the submitted values
          // but, the original `$task` variable has also been updated
          $ticket = $form-&gt;getData();
  
          // ... perform some action, such as saving the task to the database
          // for example, if Ticket is a Doctrine entity, save it!
          // $entityManager = $this-&gt;getDoctrine()-&gt;getManager();
          // $entityManager-&gt;persist($task);
          // $entityManager-&gt;flush();
  
          return $this-&gt;redirectToRoute('ticket_success');
      }
  
      return $this-&gt;render('support/ticket/ticket.html.twig', array(
          'form' =&gt; $form-&gt;createView(),
      ));
  }
  </code></pre>
  
  <p><strong>And then render the form in the twig template:</strong></p>
  
  <pre><code>        {{ form_start(form) }}
          {{ form_errors(form) }}
  
          {{ form_row(form.category) }}
          {{ form_row(form.comment) }}
          {{ form_end(form) }}
  </code></pre>
  
  <p>When I load the page I get a Symfony error stating that "Variable form does not exist".</p>
  
  <p>I have followed the documentation <a href="https://symfony.com/doc/current/forms.html" rel="nofollow noreferrer">https://symfony.com/doc/current/forms.html</a>. Where/how can I find the issue?</p>