$.ajax({
type:"POST",
url:formUrl,
data:formData,
beforeSend:function(){
$('.status').html('<b>Form is being submitted</b>');
},
success:function(data){
$('. status ').html('<b>Thank you!! We have received your form</b>');
},
complete:function(){
$('#form-id').each(function(){
this.reset(); //Here form fields will be cleared.
});
}
});
Trending Tutorials