ComboBox.value not matching
- July 10, 2021
- 2 replies
- 1109 views
Hi Everyone...
First a shout out to Thom Parker for his Change ComboBox form! https://acrobatusers.com/tutorials/change_another_field/
I am using that form to add RadioButtons to change the contents of the ComboBox and echo the event.values to holding textboxes on screen. That is all working.
Any suggestions would be treated appreciated. What am I missing?
My issue is that once the ComboBox is set with a list of items, the value does not match the item in the list on-screen.
I set a textbox with ComboBox.value. So if Accounting is selected, Pick One...RB1 is what is placed in the textbox.value.
ComboBox Format-Keystorke
var vChoice = this.getField("rbgChoice").value;
var cDeptName = ""
if( event.willCommit );
{ if (vChoice == "Choice1") {
this.getField("txEventValue").value =vChoice;
// Place all prepopulation data into a single data structure
this.resetForm(["DeptContact","DeptEmail","DeptNumber"]);
else SetFieldValuesChoice1(); } }
else{
this.getField("txEventValue").value = vChoice ;
// Place all prepopulation data into a single data structure
this.resetForm(["DeptContact","DeptEmail","DeptNumber"]);
else
SetFieldValuesChoice2(); }
}
}
SetFieldValuesChoice[1][2] are the same except of the reference 1 or 2 depending on the RadioButton number.
var vListChoice = "";
if(event.value == " ")
this.resetForm(["DeptContact","DeptEmail","DeptNumber","txListCondition"]);
else SetFieldValues(event.value);
function SetFieldValues() {
vListChoice = this.getField("dbDepartmentNames").currentValueIndices
this.getField("txEventValue").value = "SetFieldValuesChoice1 worked";
this.getField("txListValue").getItemAt(vListChoice,false); //Does not give the same value as what is listed in the ComboBox
//if (vListChoice=="Pick One....RB1") {this.getField("txListValue").value = vListChoice;
//else if ("Accounting") this.getField("txListValue").value = vListChoice ;
//else if ("Engineering") this.getField("txListValue").value = vListChoice;
//else if ("Marketing") this.getField("txListValue").value = vListChoice;
//else if ("ITSupport") this.getField("txListValue").value = vListChoice;
//else this.getField("txListValue").value = "Nothing Happened";
//}
}
