jquery : submitting a form twice

前端 未结 8 991
抹茶落季
抹茶落季 2020-12-10 03:12

I\'m creating a registration form for a client for an event they\'re hosting. The basic user details are submitted to a third-party system (ie name, email etc.) but the rest

8条回答
  •  隐瞒了意图╮
    2020-12-10 03:36

    You can use jquery.form plugin for submitting form via ajax. Checkout following url: http://jquery.malsup.com/form/

    Then in your js script try something like this

    var myvalidator = $('#form1').bValidator(optionsGrey);
    
    $('#form1').submit(function(){
        if(myvalidator.isValid()){
          $(this).unbind('submit').submit();
    
    });
    

提交回复
热议问题