cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Multiple IFs based on Check Boxes to change form fields

I am trying to add another condition to this code (in bold below) where if this check box is checked and another check box on the form is also checked the below happens. I cannot figure out to add in the second condition of a second check box being clicked. Can anyone assist??? Thank you!!

NWF$("#"+PER).click(function(){ 
   if(NWF$(this).prop("checked"))  && Another check box field is checked as well  {
       NWF$('#'+InsCoTerm).val("N/A");
       NWF$('#'+ReasonTerm).val("N/A");
       NWF$('#'+MajorMarkets).val("N/A");
       NWF$('#' +SurplusTax).find('input:radio[value="N/A"]').click();
       NWF$('#' +CarrierRating).find('input:radio[value="N/A"]').click();
       NWF$('#' +TPALicense).find('input:radio[value="N/A"]').click();
       NWF$('#' +DOIComplaints).find('input:radio[value="N/A"]').click();
       NWF$('#'+LastQ).val("N/A");
   }
   else{
       NWF$('#'+InsCoTerm).val("");
       NWF$('#'+ReasonTerm).val("");
       NWF$('#'+MajorMarkets).val("");
       NWF$('document').ready(function(){var strMyRadioButtonValue
= NWF$('#'+SurplusTax).find("input:checked").val();NWF$('#'+SurplusTax).find('input[value=\''+strMyRadioButtonValue+'\']').attr('checked',
false);});

       NWF$('document').ready(function(){var strMyRadioButtonValue
 = NWF$('#'+CarrierRating).find("input:checked").val();NWF$('#'+CarrierRating).find('input[value=\''+strMyRadioButtonValue+'\']').attr('checked',
false);});

       NWF$('document').ready(function(){var strMyRadioButtonValue
 = NWF$('#'+TPALicense).find("input:checked").val();NWF$('#'+TPALicense).find('input[value=\''+strMyRadioButtonValue+'\']').attr('checked',
false);});

       NWF$('document').ready(function(){var strMyRadioButtonValue
 = NWF$('#'+DOIComplaints).find("input:checked").val();NWF$('#'+DOIComplaints).find('input[value=\''+strMyRadioButtonValue+'\']').attr('checked',
false);});


   }
});

0 Kudos
Reply