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?
In Bootstrap 3 you can reset your form after your modal window has been closed as follows:
$('.modal').on('hidden.bs.modal', function(){
$(this).find('form')[0].reset();
});