Answered
I have a checkbox designating a service. I have a hidden textbox with the default value of that service (6). How do I make the checkbox act as a toggle to either designate the textbox as 6 (if checked) or 0 (if unchecked)?
//Get Checkbox value
var v1 = getField("Check Box1").value;
//Get Reference to text field
var f1 = getField("Text1");
//Set Text value according to checkbox value
if (v1 !== "Off") {
f1.value = 6;
} else {
f1.value = 0;
}
})();