bootstrap modal clear data on close code example
Example: bootstrap modal popup clear data with out click event
$('#yourModalName').on('hidden.bs.modal', function(event) {
$('#yourModalName').empty();
});
$('#yourModalName').on('hidden.bs.modal', function(event) {
$('#yourModalName').empty();
});