How can I get field rules to re-evaluate after a checkbox is cleared with javascript?
I have a form that normally gets submitted by an employee, but sometimes AP has to request that an employee fill it out. So, I have a checkbox at the top of the form that is displayed and AP checks it if it needs to be routed to the employee. When the checkbox is checked, certain sections with required fields are hidden. The form is then routed to the employee. The problem is when the employee gets the form, the hidden sections are still hidden because the checkbox is still checked.
I added a line in the javascript section that unchecks the field. I tried the "on load" method. Neither seem to work. The hidden sections continue to stay hidden, even though the checkbox is no longer checked.
Thanks for any help you may be able to provide.
Here's a sample of what I've tried:
//$('input[name=Field130]').prop("checked",false);
And:
$('input[name=Field130]').on('load', clearSendToEmployee);
function clearSendToEmployee () {
$('input[name=Field130]').prop("checked",false);
}