Getting dropdown to repeat in new table row
I have put the following code in a Dropdown list in the “Change” event. It works great but when the “Add Row” button is clicked the items in the dropdown of the new row do not appear. How do I get the code to repeat for each row? Any help is greatly appreciated!
HTML Code:
var newVal = this.boundItem(xfa.event.newText); // Stores the dropdown value when the user selects something from the drop down list.
switch (newVal) // Depending upon the selections made in the Sector dropdown populates the Table2.Row1.GL_DropDown field
{
case "1":
Table2.Row1.GL_DropDown.clearItems();
Table2.Row1.GL_DropDown.rawValue =null;
Table2.Row1.GL_DropDown.addItem("Option 1")
Table2.Row1.GL_DropDown.addItem("Option 2")
Table2.Row1.GL_DropDown.addItem("Option 3")
Table2.Row1.GL_DropDown.addItem("Option 4")
break;
case "2":
Table2.Row1.GL_DropDown.clearItems();
Table2.Row1.GL_DropDown.rawValue =null;
Table2.Row1.GL_DropDown.addItem("Module 1")
Table2.Row1.GL_DropDown.addItem("Module 2")
Table2.Row1.GL_DropDown.addItem("Module 3")
Table2.Row1.GL_DropDown.addItem("Module 4")
break;
case "3":
Table2.Row1.GL_DropDown.clearItems();
Table2.Row1.GL_DropDown.rawValue =null;
Table2.Row1.GL_DropDown.addItem("Station 1")
Table2.Row1.GL_DropDown.addItem("Station 2")
Table2.Row1.GL_DropDown.addItem("Station 3")
Table2.Row1.GL_DropDown.addItem("Station 4")
break;
default:
break;
}
Getting dropdown to repeat in a new table row
This is code behind a Word document?
Could you attach that file?