What is the smart way to get the previous page of the Form transition?

shuseisajdi
Member | 2
+
0
-

Using latest full web application using the Nette framework.
The goal is to implement an accessibility feature that handles user input processes involving three stages: ‘entry’, ‘confirm’, and ‘complete’.

Imagine a user is currently on the ‘confirm’ page. If they click a ‘re-edit’ button, they should be redirected back to the ‘entry’ page. However, if the user is still in the middle of inputting data, we want to avoid displaying a banner and instead automatically move focus them to the top of the form.

To achieve this behavior, we need to determine how the user arrived at the ‘entry’ page. This information will help us decide whether to display the banner or redirect to the form's top.

Question:
Is there a smart and Nette-friendly approach to achieve this redirection logic?

mystik
Member | 292
+
+1
-

Well I think simply passing some parameter like ?reedit=1 would be enough no?