I'm hoping someone can help me with Javascript syntax. I have a form where I need to set the value of a drop down based on the selection of two check boxes. I found a very good solution for setting the value with a single check box, but I can't seem to adapt it for two check boxes. I am in the process of moving a bunch of forms from Infopath to Nintex and am just now learning a little about Javascript. Here's the solution for a single check box:
Here's the script I was using for setting the dropdown value with a single check box (cribbed from the above post):
NWF.FormFiller.Events.RegisterAfterReady(function () {
NWF$("#"+Checkbox1).click(function(){
if(NWF$(this).prop("checked")){
NWF$("#"+Dropdown).val("Active");
}
else{
NWF$("#"+Dropdown).val("Inactive");
}
})
})
However, what I need is for the dropdown to only change when BOTH boxes are checked. Here's my sample form:
Here are the settings for Checkbox1. Checkbox2 is the same except everything is called Checkbox2.
Any tips on how to proceed would be greatly appreciated. Thanks in advance!