Alpha : How to show confirmation dialog on browser close or navigation for unsaved changes?

Hi everyone,
I’m working on a feature where the user fills in a form. If there are unsaved changes, I want to:

  • Show a warning dialog when the user tries to:

    1. Close the browser tab/window

    2. Refresh the page

    3. Navigate to a different page (e.g., go to home)

The dialog should show options like:

  • Save & Leave

  • Leave Without Saving

  • Cancel

I know that browser beforeunload dialogs are very limited and don’t allow custom UI, so I’m not sure how to approach this properly.
In alpha Do we have custom function for this?

@Simphiwe @Sam @gaurav.pandey @shiv

1 Like

Hi @shubham.dhamne ,

Please find the attached post link below for that:
Alpha Change Tracker Plugin Documentation - Community / Best Practices & Tutorials - Neutrinos

That should assist you if it doesn’t you can let me know.

1 Like