Copy link to clipboard
Copied
I am new to this and have a question.I am populating a field value to a different field based on a checkbox value. Scenario - add a name in text field. Then if I check box A, the value from the text field populates a text field in section A. If I check box B the value from the text field populates a text field in section B. I can get the values to populate when I check the box, but how do I clear the value if I uncheck the box? Thanks
1 Correct answer
Something like this might help get you started...
var checkBoxOne = this.getField("Check Box1").value;
if (checkBoxOne == "Yes"){
this.getField("Field One").value = "The box is checked";
}
if (checkBoxOne == "Off"){
this.getField("Field One").value = "";
}
Copy link to clipboard
Copied
Something like this might help get you started...
var checkBoxOne = this.getField("Check Box1").value;
if (checkBoxOne == "Yes"){
this.getField("Field One").value = "The box is checked";
}
if (checkBoxOne == "Off"){
this.getField("Field One").value = "";
}
Copy link to clipboard
Copied
Thanks, that worked!

