How can you prevent users from losing unsaved changes?
Question
Application Type
Reactive
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: https://success.outsystems.com/Documentation/How-to_Guides/Front-End/How_can_you_prevent_users_from_losing_unsaved_changes%3F)

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.

TestSavedChanges.oml

Solution

It's working fine


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

TestSavedChanges.oml

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.