Use this code as the Discount field's custom calculation script:
event.value = this.getField("Yes").value=="Off" ? 0 : -5;
Many thanks! It works great!
What if you have 3 checkboxes and three different values that need to go into a form field based on which box is checked?
I have three boxes that represent PT, OT, SLP.
I need to have the corresponding specialty populate in another field depending on what is checked.
Are these check-boxes mutually exclusive? If so you can use something like this:
var v = this.getField("Checkbox1").valueAsString;
if (v=="PT") event.value = "Some text";
else if (v=="OT") event.value = "Some other text";
else if (v=="SLP") event.value = "Something else";
else event.value = "";