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.
It's working fine
Put a console.log to see if the message is displayed.
Wait it was my adblock. Thanks for the help!