Put zero in text field if checkbox is checked
I have checkboxes K1 add-up checkbox, K2 add-up checkbox...K20 add-up checkbox I also have text fields formated for numbers which are K1, K2...K20. Finally, I have text fields formated for numbers which are K1_, K2_...K20_.
Numbers will be entered into K1, K2, etc. Those numbers will copy into K1_, K2, etc. So far, so good. If I check the K1 add-up checkbox, I would like the number copied into K1_ to change to zero. I am using the following custom calculation script in K1_:
if (this.getField("K1 add-up checkbox").isBoxChecked(0)) {
event.value = 0;
}
So far, this also works. The problem is that if I check more than one checkbox, say K1 add-up checkbox and K2 add-up checkbox, the zero goes away in K2 add-up checkbox and it reverts to the number that is being copied from K2.
Hopefully, I have explained this sufficiently for someone to help me with what is going. I'm thinking it mus have something to do with the custom calculation script. Thanks for any help.
