Populate text field from button group AND another text field
Yet another road block for me! I need to have my form auto populate a text field. The issue I am having is that it needs to be populated from a variety of buttons, check boxes and other text fields. I know how to do that if it just buttons and check boxes, but not how to add in the text fields. I'm also hoping to add in some permanent words if something is typed into the text fields. For example:
1. "Shortage" is chosen from the Group1 buttons
2. 9/2023 is inserted in the "Bill period" text field
3. $100.00 is inserted in the "Short amt" text field
4. "Late payment fee" is chosen from the Group2 buttons
I want the result text to say (not the colors, but colors are the tie-ins): "Shortage for 9/2023 bill period in the amount of $100.00 due to late payment fees."
Below is my form:

Below is my current script for the completed text box:
event.value = "";
var v1 = this.getField("Group1").valueAsString;
if(v1 == "Choice1"){
event.value += "BILL PERIOD balanced to zero, no O/S. ";
}
if(v1 == "Choice2"){
event.value += "Zero hours reported for BILL PERIOD. ";
}
if(v1 == "Choice3"){
event.value += "Shortage for ";
}
if(v1 == "Choice4"){
event.value += "Overage for ";
}
Beyond this, I am a little stumped as to how to include the text fields. I also don't want the person completing the form to have to type "bill period in the amount of" after the date. I just want them to enter the date and the rest will be inserted automatically because a date has been entered in the field. Thanks all for your help!
