Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

bootstrap modal clear all fields

$('#modal1').on('hidden.bs.modal', function (e) {
  $(this)
    .find("input,textarea,select")
       .val('')
       .end()
    .find("input[type=checkbox], input[type=radio]")
       .prop("checked", "")
       .end();
})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #bootstrap #modal #clear #fields
ADD COMMENT
Topic
Name
8+7 =