Summary
The Event.preventDefault() method can be used to prevent a form from resetting on submit. This method tells the user agent that if the event is not explicitly handled, its default action should not be taken as it normally would be.
1
This can be used to prevent the form from resetting when the submit button is clicked.
According to