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