Disable the back button on navigation of browser

0
I used step wizards in my application.If I click on back arrow on browser, Iโ€™m able to edit and re-submit the application again. So, I want to disable or non-editable the back button on browser in all pages of  Mendix application.
asked
2 answers
2

Hi Kavita,

As far as I know, you can not really disable the browser ‘back’ button. You could warn the user (as suggested on StackOverflow https://stackoverflow.com/questions/12381563/how-to-stop-browser-back-button-using-javascript)

Or if you want, combine this with a microflow that is triggered when using navigation outside of your application using this widget: https://appstore.home.mendix.com/link/app/78474/.

You could even, on every page of your wizard, check the validity of your context object and, based on a certain station or similar that was set in the last step, reroute or warn the user.

Good luck! 

answered
0

You can influence that by using a microflow for each step that closes the current page and then opens the next page of your wizard. Note that you need to handle the back action yourself, again by closing the page and opening another. Quite often you can optimize this using an enum attribute on your wizard context to record the current step. The microflow then only needs to close the current page and open another one depending on the enum value.

 

 

answered