jquery - Why my form start be blocked after submit in yii2? -
i have got form. created of activeform class. blocked standard submit preventdefault();
method , aftervalidate
form submit form ajax call:
$('#form').on('aftervalidate', function () { var url = $('#form').attr('action'); var data = $('#form').serialize(); $.ajax({ type: "post", url: url, data: data }); });
all works good. works first time. second submit not working other data. how can reset validation of form after every submit ajax?
Comments
Post a Comment