How To Reset Form On Modal Hidden Or Close?
I have a form in a modal, when the users clicks submit, thea form will be validated, if its contain errors, it will not be submitted, so the user can click on modal close button or
Solution 1:
$('#clear-form').on('click', function()
{
$('#my-form').find('input:text, input:password, select, textarea').val('');
$('#my-form').find('input:radio, input:checkbox').prop('checked', false);
});
Post a Comment for "How To Reset Form On Modal Hidden Or Close?"