Alert users leaving a form without saving Homer Simpson true false window.onbeforeunload = function() { if (ORBEON.xforms.Document.getValue('data-safe-input') != 'true') return "You may lose some unsaved changes."; } .xforms-control { display: block } .xforms-input { margin-bottom: .5em } .xforms-label { display: inline-block; width: 6em; } .xbl-fr-button { padding-left: 6em; line-height: 3em } First name Last name Save true