logo
search
SharePoint Document Issues

How to Show an Unsaved Changes Warning When Closing a SharePoint Form

Adam DavisAdam Davis Oct 21, 2026 869 views

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.

How to Show an Unsaved Changes Warning When Closing a SharePoint Form
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.
Before you start

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.

Solution 1Recommended

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.

1
Open your SharePoint list

Navigate to the specific SharePoint list where you want to implement the unsaved changes warning.

2
Launch Power Apps integration

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.

3
Configure the warning logic

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.

4
Publish the customized form

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.

Customize the SharePoint Form Using Power Apps
Need Help with Formulas?: Because Power Apps logic can be complex, it is highly recommended to visit the Microsoft Power Apps community forums for specific formula syntax and implementation guidance.
Free Microsoft Office alternative

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. 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
  2. 2. Install and Launch: Follow the on-screen instructions to install the software, then launch WPS Office.
  3. 3. Open Your Documents: Drag and drop your Microsoft Office files directly into the WPS workspace to begin editing immediately.
Fully compatible with Microsoft Office formats (DOCX, XLSX, PPTX) and exported SharePoint lists.Free and lightweight, consuming minimal system resources compared to standard enterprise suites.Familiar user interface ensuring seamless migration without a steep learning curve.Built-in PDF toolkit and cloud collaboration features for effortless team sharing.
microsoft office alternative - wps office

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.