I am looking for a way to clear all elements found within an HTML form contained inside a Bootstrap modal without refreshing the page.
Currently:
The user enters data and closes the modal.
When the user re-opens the modal, the previously entered data still remains.
How can I completely clear all elements within the form during the close event of the modal dialog so that when the user re-opens it, they always get fresh clean inputs & etc?
Just find your form and clear before it opens!
In Bootstrap 3 you can reset your form after your modal window has been closed as follows:
Mark Berry's answer worked fine here. I just add to split the previous code:
to: