1
0
-1

Hello team,
One of the forms linked to an application has a large amount of information to be typed by the user. It includes various types of elements such as text boxes, selection and grids with data. We have already seen that, either by user error, or by chance events, the window may be left unsaved or lost by closing it or clicking on the forward or backward buttons.

What solution could be implemented to:
1. Detect the change or closure of the page and display a confirmation message? or,
2. Have a kind of timer that counts from the moment of the last user interaction and generates the "save as draft" event?

Thank you very much!

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi,

      1. To warn about navigating away from a page you can use window.onbeforeunload like in https://stackoverflow.com/questions/1119289/how-to-show-the-are-you-sure-you-want-to-navigate-away-from-this-page-when-ch
      2. To automatically submit, perhaps you can try something like https://stackoverflow.com/questions/39522893/posting-a-form-multiple-time-to-a-hidden-iframe


        CommentAdd your comment...