title: Symfony2: What is a good pattern for preview form data before processing it?
body: <p>I've come to a common problem in the application I'm developing, there are three use cases described as:</p>
  
  <blockquote>
    <p>The object creation form must be followed by a preview page, where the
    object is displayed in it's final state, with a button to finish the
    creation, and a button to go back and modify it with the form.</p>
  </blockquote>
  
  <p>I already have a typical base creation flow. A newAction that renders a newObject template with the form, which sends the data to a createAction that checks the data, creates the object, and redirects to the showObject action.</p>
  
  <p>My rough idea is:
  The newAction renders the newObject template, with a form that sends the data to a createAction, just as before. This createAction renders a previewObject template, with two buttons, which send the form to the createAction angain, where I can check which button got pressed where I can decide to display again the form with the object's data, or finish the cration flow and redirect to the showObject action. </p>
  
  <p>My problems are:</p>
  
  <ol>
  <li>There are three different buttons (Preview, Edit and Create) which should be displayed or hiddend depending on the templates (New, Preview).</li>
  <li>The form in the previewObject template must be all hidden except for the buttons. Does the "preview" object has to be passed as a hidden form or is there another way I'm not seeing?</li>
  </ol>
  
  <p>Do I need several forms to implement this feature? I'm trying to think a solution with one form and two actions, but I'm not sure it's enough.</p>
  
  <p>This is a common use case, but I've not been able to find examples online.</p>
  
  <p>Any help would be appreciated.</p>