Put hidden fields on form 2 with the values from form 1, then when page 3 kicks you back to form 2 you get all the values back from withInput().
@thaifood I already have that. but the problem is actually the
else
{
return Redirect::back()->withInput()->with('order', $session)->withErrors($validator);
}
Because of that it gives a redirect error
return Redirect::back()->withInput()->withErrors($validator);
I found this, having the same problem.
First I thought to separate the two posts, inserting an information page:
In case of error submitting page 3, laravel goes back to page 3.
Then I followed another solution:
public function getIndex() {
$input = Input::all();
$validator = Validator::make($input, self::$startBooking);
Session::put('order', $input);
if($validator->passes()) {
$value = Session::get('order');
return redirect()->route('orderSummary', ['order' => $value]);
} else {
return Redirect::back()->withInput()->withErrors($validator);
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community