Nicolai VdS Nicolai VdS - 1 year ago 124
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 -

Answer Source

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) {
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download