Hello,
I am using the below JS code to clear fields when a previously submitted form comes back after correction for approval the second time. When it comes back for approval this time I need a few fields to be cleared like Reviewer's decision (clear previous decision so they can enter the new decision) and their comments.
$(document).ready(function() {
$('.clearThisField').each(function() {
$(this).find('input').val(''); // Clear single line fields.
$(this).find('select').val(''); // Clear drop-down fields.
});
});
The above code looks good to me but it is not doing anything at the moment. Is it because the class that I am using was created as a CSS class? I am not sure if i have to create classes separately for JavaScript. Please help me better understand this. Thank you.