Dropdown reverts to first choice when saved
I've got a form that I created that has two dropdown options, Division and Department. When you select a Division, it only shows the the Departments available for that Division. Whenever you save the document, the Department field goes blank but the Division field stays correct. The code I have is this. Any ideas on what I screwed up?
if (this.getField("Division_1").value == "Select One"){
this.getField("Department_1").setItems(["Select One"])
}
else if (this.getField("Division_1").value == "Information Technology"){
this.getField("Department_1").setItems(["Select One", "IT Applications Administration", "IT Applications Development", "IT Applications Operations", "IT Applications Support/CMS", "IT Security", "IT Network Services", "IT Helpdesk", "Project Management"])
}
else if (this.getField("Division_1").value == "Court Services"){
this.getField("Department_1").setItems(["Select One", "Court Data Specialists", "Court Interpreting", "Court Reporting", "Judges' Scheduling", "Trial Court Services"])
}
else if (this.getField("Division_1").value == "Court Education"){
this.getField("Department_1").setItems(["N/A"])
}
else if (this.getField("Division_1").value == "Human Resources"){
this.getField("Department_1").setItems(["N/A"])
}
else if (this.getField("Division_1").value == "Public Information"){
this.getField("Department_1").setItems(["N/A"])
}
else if (this.getField("Division_1").value == "State Court Administrator"){
this.getField("Department_1").setItems(["N/A"])
}
