title: How to reset form with sweetalert2
body: <p>I am using <a href="https://sweetalert2.github.io/" rel="nofollow noreferrer">SweetAlert2</a>. I want when user click on <code>Reset</code> button a popUp of SweetAlert appears for confirmation. I had done this already.<br/>
  <strong>HTML</strong></p>
  
  <pre><code>&lt;form id="storyForm" action="ephp/storyPublish.php" method="POST"&gt;
   &lt;input type="text" name="userName" /&gt;
   &lt;input type="Email" name="userEmail" /&gt;
   &lt;button type="submit"&gt;Publish&lt;/button&gt;
   &lt;button type="reset" class="model_img" id="sa-warning"&gt;Reset&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>JS</strong></p>
  
  <pre><code>$("#storyForm").on('reset', function(e) {
      var form = $(this);
      e.preventDefault();
      swal({
          title: "Are you sure?",
          text: "Do you really want to reset?",
          type: "warning",
          showCancelButton: true,
          confirmButtonColor: '#DD6B55',
          confirmButtonText: 'Go on!',
          cancelButtonText: "Ops no!",
      }).then(function(isConfirm) {
          swal({
              title: 'Success!', 
              text: 'Invoice created! Go to the invoice tab to pay it.', 
              type: 'success'
          }, function() {
             form.reset();
          });
      },function(dismiss) {
          if(dismiss == 'cancel') {
              swal("Cancelled", "Invoice not created!", "error");
          }
      });
  });
  </code></pre>
  
  <p>PopUp is appearing but form is not reseting, what's wrong with this Javascript?<br/>
  Here is the <strong><a href="https://jsfiddle.net/7cpu6pL5/" rel="nofollow noreferrer">Fiddle</a></strong></p>