I have a page with the details of a congress. In this page there is a form where a user can select the quantities of each ticket type of the congress that he wants and then clicks "Next".
Then he goes to the registration page that as a multi-step form with two steps, the first is for the user to enter some registration info (name, surname, email, etc) the second is just a confirmation step.
If there are no validation errors in the first step in the second step it appears a message saying that the user was registered with success in the congress. Between the two steps the URL is always the same http://congress.test/congress/10/congress-test/registration
, for this is used an ajax post request.
When the user is in the step 2 with the success message there is a url "Go back to congress details page":
<a href="{{route('congresses.show', ['id' => $id, 'slug' => $slug])}}">
<i class="fa fa-arrow-left"></i> Go back to congress details page</a>
And it's working fine. When the user clicks in the link goes to the details page.
Doubt: But do you know how to redirect the user to this congress details page if the user is in step 2 and clicks in the browser back button? Because when the user is in the step2 and click in the browser back button for now he goes to the step1 of the multi-step form but he should go to the congress details page.