In 2023 forms- When the user clicks the X icon to close the form window, I want to show a pop up asking user to confirm if they surely want to close the form window.
When I use Form Close trigger, it works only after the form window is closed.
I want to be able to hold the form for the user to confirm close.
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
In the latest forms, I can select No for ‘Show Window Frame’ property. But that also takes away the ability to minimize/ maximize window or moving window around.