You are viewing limited content. For full access, please sign in.

Question

Question

Prevent closing a Form with unsaved work when Form is opened from the Inbox side panel

asked on August 11, 2016

I use a simple jQuery plugin (Are You Sure) to detect when a form is "dirty" and to catch the page beforeUnload event to prompt the user if they are sure they want to leave the page while they have unsaved/unsubmitted work. This works great when you have a new submission (which loads in its own window), but it does not work for a form that has been sent to someone as a User Task and they open it from the Inbox (which loads in some kind of AngularJS side panel that does not behave like a window). Is there a good way to detect when the user presses the "X" in the side panel and display the warning about unsaved data? In my testing, the plugin actually does detect the beforeUnload event if you click on a second item in the inbox to switch to it, but it does not detect closing this side pane.

If this isn't possible currently, then maybe it should be a feature request... It's very easy to make some changes to a form in that side panel and then accidentally close it and lose your changes.

Thanks!

0 0

Answer

SELECTED ANSWER
replied on August 11, 2016

The side panel design you describe is Forms 9.x. It changed in version 10. Tasks now open in their own page. Try your plugin with that.

1 0

Replies

replied on August 12, 2016

Thanks for the suggestion! I forgot to mention this customer is still on 9.2, so you're exactly right. I'll test it on my 10.1 system and if that works, I'll see if I can plan an upgrade for them.

0 0
replied on August 12, 2016

Cool. Our largest customer is also on 9.2, and we haven't upgraded them to 10.1 due to fear of breaking a lot of our customizations. I'd be interested in how the upgrade goes for you if you end up performing it.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.