title: Is this the correct way to handle forms in two pages?
body: <p>I have an <code>index</code> page which contains a simple form; if the form validation fails the index page is reloaded with errors if not then the action related to the page forwards the request to another action related to page <code>success</code>. The <code>success</code> page uses the form submitted to create a list from DB. Once we are on <code>success</code> page we have another form similar to the first one which the user can use to modify the list on the page. Both forms have same fields.</p>
  
  <ul>
  <li><p>index page action:</p>
  
  <pre><code>class DefaultController extends Controller {
  
  /**
   * @Route("/", name="homepage")
   */
  public function indexAction(Request $request) {
  
      $event = new Event();
      $form = $this-&gt;createForm(EventForm::class, $event);
      $form-&gt;handleRequest($request);
  
     if($form-&gt;isSubmitted() &amp;&amp; $form-&gt;isValid()) {
  
          // Do some minor modification to the form data
          $event-&gt;setDate($party-&gt;getDate()-&gt;modify('+12 hours'));
          $cityName = strtolower($event-&gt;getPlace()['city']);
  
          // We know the form data is valid, forward it to the action which will use it to query DB
         return $this-&gt;forward('AppBundle:Frontend/Default:eventsList', array('request' =&gt; $request));
  
      }
  // If validation fails, reload the index page with the errors
  return $this-&gt;render('default/frontend/index.html.twig', array('form' =&gt; $form-&gt;createView()));
  }
  </code></pre></li>
  <li><p>success page action (where the form data gets forwarded)</p>
  
  <pre><code> /**
    * @Route("/success", name="eventList")
    */
   public function eventsListAction(Request $request) {
   $event = new Party();
   // Create a form in the second page and set its action to be the first page, otherwise form submition triggers the FIRST action related to page index and not the one related to page success
   $form = $this-&gt;createForm(EventForm::class, $event, array('action' =&gt; $this-&gt;generateUrl('eventList')));
   $form-&gt;handleRequest($request);
  
   if($form-&gt;isSubmitted() &amp;&amp; $form-&gt;isValid()) {
      $event-&gt;setPlace($form["place"]-&gt;getData());
      $event-&gt;setTitle($form["title"]-&gt;getData());
  
      $repository = $this-&gt;getDoctrine()
          -&gt;getRepository('AppBundle:Event');
  
      // ....
      // Create a list of events using the data from DB
      // ....
  
      return $this-&gt;render('default/frontend/success.html.twig',
          array('events' =&gt; $events, 'form' =&gt; $form-&gt;createView())
      );
  }
  
  return $this-&gt;render('default/frontend/success.html.twig', array('form' =&gt; $form-&gt;createView()));
  }
  </code></pre></li>
  </ul>
  
  <p>Although the above implementation "works" I have a couple of issues:</p>
  
  <ol>
  <li><p>When I submit the first form the url stays the same, that of the first page like: </p>
  
  <p>[HOST]/app_dev.php?place=London&amp;Date=......</p></li>
  </ol>
  
  <p>But if I submit the second form the URL is correctly:
       [HOST]/app_dev.php/success?place=London&amp;date=.....</p>
  
  <ol start="2">
  <li>The implementation feels hacky to me, is there a cleaner way to achieve this?</li>
  </ol>