Javascript for auto populate field based on checkboxes
I guess the title of the discussion is a bit misleading because I have already figured out how to fill out a text field based on the value entered on another text field if a certain box is checked, however:
If the second checkbox is checked (var b2), I would like the user to be able to free text in that field. So essentially, I am asking how do I write Javascript for "Free Text" in an if statement.
I tried not having a second variable at all, however, if the user accidentally selects the first checkbox, the value remains in the text field even if the checkbox is unchecked afterwards.
var b1 = this.getField("RCB1").isBoxChecked(0);
var b2 = this.getField("RCB1").isBoxChecked(1);
if(b1)
event.value = this.getField("DLAST").value
if(b2)
event.value = (????????????????)
