title: Laravel 4 Preview Form Submit
body: <p>Any idea how to solve the following approach.
  I have a form and want to display the entered data in a specific formtemplate before store it in the DB. If the entered data looks properly, the user can save the form.So I am searching for a way to display the entered data as a preview in a new window/tab first. With my code below I am not able to preview the form without saving the data in the databse. Also display the preview in a new window or tab is not possible. I guess there is no way to achieve this with php / laravel. I tried some onlick events, but no luck. As it seems like the route is prefered. 
  Any idea how to solve this? </p>
  
  <p>My form looks like:</p>
  
  <pre><code>{{ Form::open(array('url' =&gt; 'backend/menubuilder/'.$id, 'method' =&gt; 'PUT'))}}
  
  &lt;section&gt;
  &lt;div class="container"&gt;
    &lt;div class="row"&gt;
      &lt;div class="inputBox"&gt;
        &lt;div class="col-xs-12 col-md-6"&gt;
          &lt;h3&gt;Montag&lt;/h3&gt;
          &lt;div class="form-group"&gt;
            {{Form::label('gericht_1_mo','Gericht 1')}}
            {{Form::textarea('gericht_1_mo', Auth::user()-&gt;gericht_1_mo,array('class' =&gt; 'form-control'))}}
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
            {{Form::label('preis_1_mo','Preis', array('class' =&gt; 'col-md-6'))}}
            {{Form::text('preis_1_mo', Auth::user()-&gt;preis_1_mo, array('class' =&gt; 'col-md-6'))}}
          &lt;/div&gt;
  
          &lt;div class="form-group mrgT55"&gt;
            {{Form::label('gericht_2_mo','Gericht 2')}}
            {{Form::textarea('gericht_2_mo', Auth::user()-&gt;gericht_2_mo,array('class' =&gt; 'form-control'))}}
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
            {{Form::label('preis_2_mo','Preis', array('class' =&gt; 'col-md-6'))}}
            {{Form::text('preis_2_mo', Auth::user()-&gt;preis_2_mo, array('class' =&gt; 'col-md-6'))}}
          &lt;/div&gt;
        &lt;/div&gt;                   
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  {{Form::submit('update')}}
  {{-- &lt;input type="submit" name="preview" value="preview"&gt; --}}
  {{Form::close()}}
  {{ Form::open(array('url' =&gt; 'backend/menubuilder/templatesview/'.$id, 'method' =&gt; 'POST'))}}
  {{-- {{Form::submit('Preview',array('onClick' =&gt; 'target_blank'))}} --}}
  &lt;input onclick="newTab()" type="submit" name="preview" value="preview" &gt;
  {{Form::close()}}
  </code></pre>
  
  <p>My routes:</p>
  
  <pre><code>Route::get('backend/menubuilder/templates/{id}', 'MenuBuilderController@template');
  Route::post('backend/menubuilder/templatesview/{id}', 'MenuBuilderController@preview');
  </code></pre>
  
  <p>My Controller:</p>
  
  <pre><code>    public function preview($id)
  {
      $user = User::find($id);
      $owner = (Auth::id() === (int) $id);
      return View::make('backend/menubuilder/templatesview/tempone')-&gt;withUser($user)-&gt;withOwner($owner); 
  }
  
  public function template($id)
  {
  
      $user = User::find($id);
      $owner = (Auth::id() === (int) $id);
      return View::make('backend/menubuilder/templates/tempone')-&gt;withUser($user)-&gt;withOwner($owner);     
  }
  </code></pre>