add preventResubmission function into functions.php