Skip to main content
Known Participant
August 21, 2020
Answered

If Check Box is Checked, populate another field

  • August 21, 2020
  • 1 reply
  • 992 views

In the form I am creating, I have a Check Box.  If the Check Box is selected, I'd like to have another Text Box populate with a Calculation.

I currently have the calculation work but I only want it displayed when the Check Box is marked.

This topic has been closed for replies.
Correct answer try67

You can use something like this:

 

if (this.getField("CheckBox1").valueAsString=="Off") event.value = "";

else {

// place calculation code here

}

 

Edit: Typo fixed in code

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
August 21, 2020

You can use something like this:

 

if (this.getField("CheckBox1").valueAsString=="Off") event.value = "";

else {

// place calculation code here

}

 

Edit: Typo fixed in code

bfry2461Author
Known Participant
August 22, 2020

Thank you.