title: Prevent form submission till SweetAlert is true
body: <p>I want to do some actions when a form is submitted. But first i want to check if the form should delete anything. The thing is, i cant get my form submitting again. How do i fix this?</p>
  
  <pre><code>$('body').on('submit', 'form', function ( e )
          {
              let self = $(this);
              if ( self.find('input[name="_method"]').val() == 'DELETE' )
              {
                  e.preventDefault();
                  swal({
                          title: window.translations.delete_item_title,
                          text: window.translations.delete_item_content,
                          type: "warning",
                          showCancelButton: true,
                          confirmButtonColor: "#DD6B55",
                          confirmButtonText: window.translations.delete_item_confirm,
                          cancelButtonText: window.translations.delete_item_cancel,
                          closeOnConfirm: false
                      },
                      function (input)
                      {
                          if(input){
                              $(this).submit();
                          }
                      });
              }
          });
  </code></pre>