Copy link to clipboard
Copied
I'm created a form where users have a list of check boxes they can choose from. I want a text field to change colors according to which checkbox they select. I have worked through a few ways of doing this, and can make a check box change colors, but when I click off of said checkbox, it goes back to white (or blue as it appears to indicate it's a selectable field) and doesn't remain the color I need it to.
The code I've tried is:
event.target.fillColor = (color.equal(color.transparent, event.target.fillColor)) ? color.red : color.transparent;
Is there a way to make sure the checkbox stays red? Any help is greatly appreciated!
Copy link to clipboard
Copied
There are many places to place the JavaScript. Where exactly did you place the code?
Copy link to clipboard
Copied