title: How to set up flag in wizard form to allow submit/override other function
body: <p>Hi I have a long form that is split into a wizard. To prevent the user from hitting browser back button and losing data I have the following:</p>
  
  <p>window.onbeforeunload = function() {
      return "Hitting back will cause you to lose all form data.";
  };</p>
  
  <p>How would I insert a flag and apply to the last step so the form can be submitted properly?
  Thanks,</p>