Clear form when back to previous page

I’m working in a Native Mobile App, and i’m currently building a flow where the user fills a form in the first step, then presses a Confirmation button to go the 2nd step. If, from the 2nd step ,the user goes back to the previous (1st) step, i need the form to appear cleared. I thought about creating a nanoflow to be trigger on the back button (left arrow icon) of my app, where i would put a “Change Object” action and set the Entity to empty. But if the user uses the back buton of his device (and not the one i coded), the behavior will not be triggered. Any thoughts on how to achieve this?
3 answers

Hi Rafael, You can close the current page and create an object(empty obv) and pass it to page, this is the simplest way. Let us know if you have any specific requirement and you don’t want to implement in this way, so we may suggest other ways as well. 
Hope this will help you.


 On the confirmation of the next-step itself, clear the form and store the values in a non-persistable entity and use those values at the time of commit. If the user goes back, the form will be clear and if they press confirmation for the next step, again, the latest values will be copied to the non-persistable enity.



I think the default behavior is a good one. When I navigate back, I expect the previous form is still filled.

So in my opinion you should never (want to) change the default behavior, simply because the user expects the default behavior.

If you want to reset you can create a button to start from scratch from step one. This is not a back-button, but a navigation to step one.