title: SweetAlert2 Cancel button still submitting form
body: <p>I have a simple form with which I'm trying to use <a href="https://sweetalert2.github.io" rel="nofollow noreferrer">SweetAlert2</a> to get the user to confirm their submission before submitting and processing the form.</p>
  
  <p>I'm using the code below to interrupt the submission flow however the form submits regardless of whether the user presses cancel of clicks off the modal. Does anyone know what I'm doing wrong?</p>
  
  <pre><code>&lt;script&gt;
  
  $(document).on('click', '#note_submit', function(e) {
      e.preventDefault();
      swal({
          title: "Are you sure?",
           text: "Once deleted, you will not be able to recover this imaginary file!",
          buttons: true,
          dangerMode: true,
          icon: "warning",
          input: 'checkbox',
          inputValue: 0,
          showCancelButton: true,
          inputPlaceholder: ' I agree with the Terms',
          confirmButtonText: 'Continue',
          inputValidator: function (result) {
              return new Promise(function (resolve, reject) {
                  if (result) {
                      resolve();
                  } else {
                      reject('You need to agree with the Terms');
                  }
              })
          }
      }).then(function (result) {
          $('#notes_form').submit();
      });
  });
  
  
  &lt;/script&gt;
  </code></pre>