how do I delete all the contents of the fields in the form, if I use ajax to post to the controller
<form id="addform">
$("#btnadd").on("click",function(){
$(this).attr('disabled','disabled');
var tampung = $("#addform").serialize();
$.ajax({
type: "POST",
url: "{{route('add-form')}}",
data: tampung,
dataType: "json",
success: function(response) {
if(response.validator == 'error'){
$("#btnadd").removeAttr('disabled');
}
if(response.status){
createAlert(response.status, "success");
$(".close").trigger('click');
$("#btnadd").removeAttr('disabled');
//there i need refresh form
VendorClient.ajax.reload(null, false);
}
});
});