Skip to main content
Participating Frequently
September 12, 2025
Question

Checkbox function

  • September 12, 2025
  • 1 reply
  • 72 views

I am creating a form and would like to have it so when a check box is checked the color in the text field next to it is black, when not checked I would like the text to change to red. Is this possible?

 

my checkbox is "C1" and text field is "Text348"

 

1 reply

try67
Community Expert
Community Expert
September 12, 2025

Yes. As the custom calculation script of the text field enter the following:

 

if (this.getField("C1").valueAsString=="Off") event.target.textColor = color.red;

else event.target.textColor = color.black;