view raw
Nicolai VdS Nicolai VdS - 9 months ago 69
jQuery Question

Reset Form on Boostrap modal close event

So i have a data table that you can select a row and it gets the data from the table and puts it into a form thats in a modal all of that works but when i close the modal i wanna reset the form.

$('.modal').on('', function () {
// reset form

but when i close the modal the form isnt reset.

demo -


I think you do not need event to show data in modal.

Pleas try after removing this event.

$('.modal').on('', function () { }

And edit this :

$(this).find('input').each(function (index) {

To this:

$('.modal').find('input').each(function (index) {