Forms 2023 version- How to get a close confirm pop up when user closes using window X icon?

Hello @Navin_Prasadh_Subramanian In UiPath Apps (2023 Forms), the *Form Close trigger executes after the form is closed, so it cannot prevent the window from closing. However, you can achieve this behavior using a custom close button instead of relying on the default “X” close icon.
Try this
1.Disable the Default “X” Button

This depends on your UiPath Form settings.
If you are using a UiPath Form Designer, look for the property:
"Window Close Button" → Set it to False.
2.Add a Custom “Close” Button

Inside your form, add a button labeled “Close Form”.
3.Show a Confirmation Dialog on Click

Use a Boolean variable (showConfirmation) to manage the pop-up visibility.
When the user clicks “Close Form”:
Set showConfirmation = true to show a pop-up.

4Inside the Pop-up:

Add “Yes” and “No” buttons.
If the user clicks “Yes”, trigger a Close Form action.
If the user clicks “No”, hide the pop-up (showConfirmation = false).
Hope it helps:

1 Like