What is the use of onBackPress event in vDesigner 2?

Please explain with an example.

hi @Chitransh_Varshney
According to me, In Vahana Cloud, the onBackPress event is used to handle the behavior when the user presses the back button (or navigates away from the current screen). You might need to implement a custom action, like navigating to a different screen, showing a confirmation message, or performing some other logic before the user exits the current page.

For example, on certain screens (such as forms), you might want to ask the user if they want to save their changes before leaving, or you could return to a previous screen in the application.

2 Likes

Hi @Chitransh_Varshney,

The OnBackPress event occurs when a user navigates back using the mobile device’s functionality. In response, the application should behave accordingly, either by returning to the previous page or undoing the last performed action, as per the defined functionality.

1 Like