dismiss modal with clear field 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();
});