How can you prevent users from losing unsaved changes?
Application Type
Service Studio Version
11.14.12 (Build 59645)
Platform Version
11.13.0 (Build 31107)

I followed the documentation on how to prevent users from losing unsaved changes to a tee (shown here:

It does nothing. I put a form on the screen, I put a checkbox in that form and attached it to a boolean screen variable, I hid the checkbox with display none css, then I passed the form id and checkbox id to the javascript shown on the page. The instructions were incredibly simple, but nothing happens. I have attached OML.

Edit: I have tried putting the javascript in the OnReady event, and I have tried not hiding the widget with CSS, and neither work.



It's working fine

Put a console.log to see if the message is displayed.


Wait it was my adblock. Thanks for the help!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.