title: jQuery to handle two submits one with validation and another without validation
body: <p>I have a form as:</p>
  <pre><code>&lt;form method='post' action=&quot;submit.cfm&quot; id='formid' class=&quot;formclass&quot; name=&quot;formname&quot;&gt;
      &lt;input type='submit' name='submit' value=&quot;save&quot;&gt;
      &lt;input type='submit' name='submitDraft' value=&quot;save draft&quot;&gt;
  &lt;/form&gt;
  </code></pre>
  <p>Now without jQuery, I can submit the form and it will validate with html required fields for whichever fields it needs to be, and I will fill it and save it, now for the save draft, I want to save it without validation and trying to use jQuery to accomplish this but it's not working as expected.</p>
  <p>I tried like this:</p>
  <pre><code>$(&quot;#formid&quot;).submit(function(event) {
      event.preventDefault();   // prevent default action 
      var post_url = $(this).attr(&quot;action&quot;);   // get form action url
      var form_data = $(this).serialize();     // Encode form elements for submission
      
      $.post( post_url, form_data, function( response ) {
        $(&quot;#server-results&quot;).html( response );
      });
  });
  </code></pre>
  <p>Now can I kill 2 birds with one stone, any feasible solution? There is no upload field, so I am safe from that perspective.</p>
  <p>More tried came up with</p>
  <pre><code>&lt;script type=&quot;text/javascript&quot;&gt;
  $(document).on('submit','#formid',function(event) {
     event.preventDefault(); //prevent default action 
     var _id = $(this).find(&quot;#saved&quot;).attr('id');
     if(_id == 'saved') {
        alert('hi');
        var isDrafted = 0;
        $.validate({
           modules : 'date, file'
        });
     } else {
        alert('hello');
        var isDrafted = 1;
        var post_url = $(this).attr(&quot;action&quot;); //get form action url
        var form_data = $(this).serialize() &amp; '&amp;isDrafted=' + isDrafted; //Encode form elements for submission
        
        $.post( post_url, form_data, function( response ) {
          $(&quot;#server-results&quot;).html(response);
        });
     }
  });
  &lt;/script&gt;
  </code></pre>
  <p>Now I am using a formvalidation.net validator, its old but its working, and honestly it is going to be mess to replace it, so how can I make this work?</p>
  <p>Something else noticed, I had to click the button twice before it shows validation messages when clicked on save.</p>
  <p>And the whose context is save means submit to the action page to save in database</p>