Feedback Formulaire

This commit is contained in:
Divlo
2019-12-21 19:32:05 +01:00
parent b43367cdcd
commit ae2c0ad184
9 changed files with 187 additions and 5 deletions

View File

@ -218,5 +218,23 @@ $(function () {
}
}
});
});
$('#feedbackForm').submit((e) => {
e.preventDefault();
const postdata = $('#feedbackForm').serialize();
$.ajax({
type: 'POST',
url: '../../php/feedbackForm.php',
data: postdata,
success: (response) => {
const result = JSON.parse(response);
$(".results").html(result.message);
if(result.isSuccess) {
$("#feedbackForm")[0].reset();
}
}
});
});
});