It would be nice to prevent certain user behaviors when they try to exit an application i.e. trigger an INVALID() message when a user exits an application after entering data.
Our primary problem: we sometimes have new staff that will press the "back" button one too many times and ignore the final "Are you sure you want to discard any changes?" message. A simple backstop we'd love to add in would be something like (pseudo-code):
ON('unload-record', function(event){
// have some kind of counter that detects high volume data entry
if (repeatable_field.length > 10 && $confirm_delete_button == 'no'){
INVALID('It appears you have many unsaved records, please confirm that you want to >>DELETE FOREVER<< these data');
// Force the user to "double confirm" that they want to discard lots of data SETHIDDEN('confirm_delete_button', false);