I'm trying to clear the form when the "Start Over" (Submit) button is chosen. Everything works fine when I click the Reject (Cancel) button:
$(document).ready(function(){
//Remove required fields when cancelling
$('.Reject').click(function() {
$('*[required]').each(function() {
$(this).removeClass('required')
$(this).removeAttr('required');
});
});
//Reset form when starting over and remove required fields
$('.Submit').click(function() {
$(".Submit").prop("type", "reset");
$('*[required]').each(function() {
$(this).removeClass('required')
$(this).removeAttr('required');
});
});
}); //close document.ready
This is what happens: