Copy link to clipboard
Copied
How do I write a javascript to select or not select a checkbox based on the answer given in a dropdown? So for example
If "yes" is selected in the dropdown, the N/A checkbox is not selected.
If "no" is selected in the dropdown, the N/A checkbox is selected.
Copy link to clipboard
Copied
As validation script of dropdown field, use this:
if(event.value == "yes")
this.getField("N/A").checkThisBox(0,false);
else if(event.value == "no")
this.getField("N/A").checkThisBox(0,true);
Copy link to clipboard
Copied
As validation script of dropdown field, use this:
if(event.value == "yes")
this.getField("N/A").checkThisBox(0,false);
else if(event.value == "no")
this.getField("N/A").checkThisBox(0,true);
Copy link to clipboard
Copied
Seems simple enough, but I can't get it. Are there any other settings I should check?
Copy link to clipboard
Copied
Check if checkbox name is "N/A" and if dropdown choices are "yes" and "no" or "Yes" and "No", because it's case-sensitive.
Copy link to clipboard
Copied
That's it! I didn't realize it was case sensitive. Thanks so much for your help and quick reply.