The modal is not aware of your input fields. You need to manually clear those within the hidden event:
$('#myModal').on('hidden', function() {
$('inputEmail').val(null);
});
You could create a custom wrapper for the bootstrap modal where you give it an array of jQuery objects to clear:
var myModal = function (id, inputs) {
$(id).on('hidden', function () {
$.each(inputs, function(i, input) {
input.val(null);
});
});
return $(id).modal();
};
This is just a rough idea....
The best method is to use a JavaScript framework, like Knockout.js, Angular.js, Backbone.js, or others. They can really help you out with similar event issues.