Skip to content

Commit

Permalink
Reset the web form on successful submission, fixes #283
Browse files Browse the repository at this point in the history
  • Loading branch information
mckennapsean committed Feb 19, 2019
1 parent 9e2ab0b commit a39aedf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions form-submission-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
xhr.onreadystatechange = function() {
console.log(xhr.status, xhr.statusText);
console.log(xhr.responseText);
form.reset();
var formElements = form.querySelector(".form-elements")
if (formElements) {
formElements.style.display = "none"; // hide form
Expand Down

0 comments on commit a39aedf

Please sign in to comment.