Warn user of losing unsaved changes in mobile app
Application Type
Mobile, Reactive
Service Studio Version
11.11.14 (Build 48586)

In our app, our users fill out a great deal of data (Inventory management). The form they have has 10+ fields plus the ability to take and save photographs. In some cases a user may accidentally navigate away from the form and lose their work.

Our existing solution is a boolean local variable that gets flipped to true if the user changes any of the individual fields. This is inelegant and navigation (menu, back button, bottom bar navigation) doesn't respect it.

What I need is an event (like onbeforeunload) in where I can run a client action that detects changes in the form and if there are any present warn the user of lost data and offer the save button to them.

mvp_badge
MVP

Hi Charles,

I would suggest you refer and try the solutions mentioned in the below links 

RWA | How_can_you_prevent_users_from_losing_unsaved_changes

how-can-i-avoid-that-the-user-leaves-the-screen/


Hope it helps you!


Kind regards,

Benjith Sam

I've looked at those previously. They are solutions for WEB apps. Not for a tablet app

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