How to Show an Unsaved Changes Warning When Closing a SharePoint Form
Question details
Users want to know how to display a warning prompt when attempting to close a SharePoint form that contains unsaved new or modified data.

- Product
- Microsoft SharePoint
- Device & OS
- not provided
- Scenario
- Editing or creating records within a standard SharePoint list or document library form.
- Observed behavior
- The default SharePoint form closes immediately without alerting the user about unsaved data, which can lead to accidental data loss.
Verify that you have Site Owner or Full Control permissions for the SharePoint list, and ensure your Microsoft 365 license includes access to Microsoft Power Apps.
Customize the SharePoint Form Using Power Apps
Since the default SharePoint form lacks a built-in unsaved changes warning, you must convert it into a Power Apps canvas app to manually configure this behavior.
The standard out-of-the-box SharePoint list forms do not support custom closing prompts or unsaved data validation. To protect users from losing their input, the form must be customized using Microsoft Power Apps. Within Power Apps, you can utilize the 'Unsaved' property of the form control to trigger a confirmation dialog when a user tries to navigate away.
Navigate to the specific SharePoint list where you want to implement the unsaved changes warning.
Click on 'Integrate' in the top command bar, select 'Power Apps', and then click 'Customize forms' to open the form in the Power Apps Studio.
Create a popup or dialog group in Power Apps. Modify the 'OnSelect' property of your close or cancel button to check if 'SharePointForm1.Unsaved' is true. If true, set a variable to show the warning dialog; otherwise, navigate back to SharePoint.
Once the logic is tested, click 'File', select 'Save', and then click 'Publish to SharePoint' to replace the default form with your new custom form.

A Lightweight Alternative for Your Document Management
While SharePoint form customizations require complex Power Apps routing and Microsoft ecosystem licenses, managing your everyday office documents shouldn't be complicated. WPS Office provides a free, lightweight, and highly compatible alternative to Microsoft Office for creating, editing, and sharing your files.
- 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
- 2. Install and Launch: Follow the on-screen instructions to install the software, then launch WPS Office.
- 3. Open Your Documents: Drag and drop your Microsoft Office files directly into the WPS workspace to begin editing immediately.

Frequently Asked Questions
Can I enable an unsaved changes warning in SharePoint without using Power Apps?
No, standard SharePoint list forms do not offer a native setting or toggle to prompt users about unsaved changes. Customizing the form with Power Apps is the only Microsoft-supported method to achieve this.
Why did my standard SharePoint form close without saving my data?
Default SharePoint forms lack built-in data validation for browser closing or navigation events. If you navigate away, hit the back button, or close the browser tab before explicitly clicking 'Save', any entered data is automatically discarded.
Where can I find templates or help for Power Apps form formulas?
The official Microsoft Power Apps Community is the best resource. You can find pre-built templates, tutorials, and ask experts for the exact formula syntax required to detect unsaved states in your customized SharePoint forms.




