How to change checkbox color and use these colors as condition?
Hello!
I have several checkboxes in my PDF, and I would like them to act as follows:
• When clicking once, the check appears in white.
• When clicking again, the check changes to green ["RGB", 0/255, 180/255, 160/255]
• When you click again, the check leaves. .value = "Off";
And then, I would like to use these colors as conditions for some ifs.
Something like this:
if (this.getField("Checkbox1").textColor == ["RGB", 0/255, 180/255, 160/255]) { something happen }
or
if (this.getField("Checkbox1").textColor == ["RGB", 1, 1, 1]) { something happen }
Is it possible to do these things? If so, how?
I tried, but was unsuccessful.
Thank you!
