I’m working on an Appian Portal where clients fill out survey details. Requirement: if a user tries to Alt+Tab, refresh, close the browser, or navigate away without saving, we want to show a warning message so they don’t lose entered data.
Has anyone implemented this before? I’m currently tracking unsaved changes with a local flag, and I’m exploring using a!webContentField() to inject JavaScript (beforeunload event) to display the browser’s native confirmation prompt.
a!webContentField()
beforeunload
Looking for best practices or recommendations on:
Reliable way to trigger warnings in Portals.
Discussion posts and replies are publicly visible
Does your trick with the web content field work?
No, that trick with the web content field doesn’t work. Suggest to add the JavaScript update in the portal package
You will have to open a support case to propose a product enhancement to get this into the platform.