I have a process where all the manager reviews are done on one form. I'm using JavaScript to hide, mark read only, and/or, clear the fields depending on which task the process is at.
Hide: so managers don't accidentally fill in the wrong section.
Read Only: so managers don't edit other managers information by accident.
Clear Fields: in case a manager sends it back as not belonging to them it clears the fields so the next manager doesn't have to delete and then enter their new information.
The process was working until I added the clear fields code. It will clear the fields but when I select an option for the radio field (Approved/Not Approved/Not My Unit) it will show the selection and allow me to submit the form (it's marked as a required field) but when it goes to route it to the next task it's not recognizing that one of those options was selected and so it takes the default path.
Any help with the code to get this working would be much appreciated!
if ($('input[name="stepid"]').val() == "30") {
$('.clearUnit input, .clearUnit textarea, .clearUnit select').each(function() {clearSection($(this), true);});
} else if ($('input[name="stepid"]').val() == "112") {
$('.clearUnit input, .clearUnit textarea, .clearUnit select').each(function() {clearSection($(this), true);});
} else if ($('input[name="stepid"]').val() == "102") {
$('.clearL2Unit input, .clearL2Unit textarea, .clearL2Unit select').each(function() {clearSection($(this), true);});
} else if ($('input[name="stepid"]').val() == "80") {
$('.clearDirector input, .clearDirector textarea, .clearDirector select').each(function() {clearSection($(this), true);});
} else {
//do nothing
}