Jquery form is not submitting

I have page with form on it, I am trying to disable the button on submit with a custom disable message on it, and submit the form after using jquery.

<input type="text" name="run"/>
<input type="submit" class="send" value="Save" data-attr-message="Sending..."/>

I have try both form submit or form[0] submit neither submits the form, I try logging the form, the form is logged correctly to console, and there are no errors in console when clicking submit.

$(document).ready(function() {
      $('.send').click(function(e) {
        var button = $(this);
        var form = button.closest("form");
        button.prop('disabled', true);
        console.log(form); //Logs form fine
        //  form.submit();
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <input type="text" name="run" />
  <input type="submit" class="send" value="Save" data-attr-message="Sending..." />

Read more here: https://stackoverflow.com/questions/64941588/jquery-form-is-not-submitting

Content Attribution

This content was originally published by WayOfLife at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: