SharePoint close Button alert

is there anyway to warn the user when they click on "Close" button rather then "Save" button to make sure they save changes?

I have users who spend considerable time on a form and mistakenly click on "Close" and they loose their changes.


Hello @eweiler,

You can change the behavior of the tollbar close button using the code.

    //change click function
    fd.toolbar.buttons[1].click = function(){
        if (confirm('Are you sure you want to exit the form?')) {

Please find more information here.

Thank you !!

As always, you folks come thru!

1 Like