clear message field after submitting it

master
Aevann1 2022-10-23 00:10:36 +02:00
parent c2bb3303e1
commit 78e1bf9784
1 changed files with 3 additions and 1 deletions

View File

@ -115,6 +115,8 @@ function submitFormAjax(e) {
myToast.show();
document.getElementById('toast-post-error-text').innerText = data["error"];
if (data && data["details"]) document.getElementById('toast-post-error-text').innerText = data["details"];
document.getElementById('input-message').value = ''
document.getElementById('input-message-mobile').value = ''
} catch(e) {
var myToast = bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-post-success'));
myToast.hide();
@ -127,4 +129,4 @@ function submitFormAjax(e) {
xhr.send(formData);
return false
}
}