Trouble with a nested list of radio button options

mdawn50

17-08-2015

Hello,

I'm having trouble with a nested list of radio button options on an order form where the customer picks a "narrowing" list of descriptive options. I'm thinking from research that this needs an array to solve the problem I'm having. However, I'm new to setting up and using an array, so could use some help. Here goes!

List 1

There is a four option radio button list1.

When an option is chosen from List 1, another list is displayed--a different one for each option from List 1.

So these are lists 2-5

The number of options on lists 2-5 vary.

List 2 has five options - each option opens another list. These lists have a variety of number of options.

List 3 has two options - each option opens another list. These lists have a variety of number of options.

List 4 has two options - each option opens another list. These lists have a variety of number of options.

List 5 opens a free form field.-

I have the scripts working for each option to open the correct sub list. However, if at the third level the user changes their mind and goes back to level 1 and changes the option, the last set of options does not become hidden.

Am I correct that this needs an array to control. A sample of how to set up an array would be helpful.

Thanks,

MDawn

Accepted Solutions (0)

Answers (3)

Answers (3)

mdawn50

27-08-2015

To perhaps to help others needing a solution, I'm sharing my fix. I fixed this problem by changing from radio button lists to drop down lists. The second drop down list is populated by the first drop down list. Then for the third level, I kept the radio button lists. For some reason, using the switch/case scripting, I was able to allow the user to go back to the first drop down and change their selection and get all radio button lists to be hidden. Here is the script I used:

Drop Down List 1

switch(xfa.event.newText)

{

  case "Official Seal":

  DropDownList2.rawValue = null;

  DropDownList2.clearItems();

  DropDownList2.addItem("Chair");

  DropDownList2.addItem("Rocker");

  DropDownList2.addItem("Swivel Chair");

  DropDownList2.addItem("Child's Rocker");

  DropDownList2.addItem("Lamp");

  form1.page1.flowedOrderItems.otherSealDescription.presence = "hidden";

  form1.page1.flowedOrderItems.childRockerSelections.presence = "hidden";

form1.page1.flowedOrderItems.lampSelection.presence = "hidden";

form1.page1.flowedOrderItems.chairMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.rockerMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.swivelChairSelects.presence = "hidden";

form1.page1.flowedOrderItems.rockerLawSelections.presence = "hidden";

form1.page1.chairSelections.presence = "hidden";

form1.page1.rockerSelections.presence = "hidden";

form1.page1.chairLawSelections.presence = "hidden";

  break;

  case "Medical School Seal":

  DropDownList2.rawValue = null;

  DropDownList2.clearItems();

  DropDownList2.addItem("Medical School Seal Chair");

  DropDownList2.addItem("Medical School Seal Rocker");

  form1.page1.flowedOrderItems.otherSealDescription.presence = "hidden";

  form1.page1.flowedOrderItems.otherSealDescription.presence = "hidden";

  form1.page1.flowedOrderItems.childRockerSelections.presence = "hidden";

form1.page1.flowedOrderItems.lampSelection.presence = "hidden";

form1.page1.flowedOrderItems.chairMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.rockerMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.swivelChairSelects.presence = "hidden";

form1.page1.flowedOrderItems.rockerLawSelections.presence = "hidden";

form1.page1.chairSelections.presence = "hidden";

form1.page1.rockerSelections.presence = "hidden";

form1.page1.chairLawSelections.presence = "hidden";

  break;

  case "Law School Seal":

  DropDownList2.rawValue = null;

  DropDownList2.clearItems();

  DropDownList2.addItem("Law School Seal Chair");

  DropDownList2.addItem("Law School Seal Rocker");

  form1.page1.flowedOrderItems.otherSealDescription.presence = "hidden";

  form1.page1.flowedOrderItems.otherSealDescription.presence = "hidden";

  form1.page1.flowedOrderItems.childRockerSelections.presence = "hidden";

form1.page1.flowedOrderItems.lampSelection.presence = "hidden";

form1.page1.flowedOrderItems.chairMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.rockerMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.swivelChairSelects.presence = "hidden";

form1.page1.flowedOrderItems.rockerLawSelections.presence = "hidden";

form1.page1.chairSelections.presence = "hidden";

form1.page1.rockerSelections.presence = "hidden";

form1.page1.chairLawSelections.presence = "hidden";

  break;

  case "Other Seal":

  DropDownList2.rawValue = null;

  DropDownList2.clearItems();

  form1.page1.flowedOrderItems.otherSealDescription.presence = "visible";

  form1.page1.flowedOrderItems.lampSelection.presence = "hidden";

form1.page1.flowedOrderItems.chairMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.rockerMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.swivelChairSelects.presence = "hidden";

form1.page1.flowedOrderItems.rockerLawSelections.presence = "hidden";

form1.page1.chairSelections.presence = "hidden";

form1.page1.rockerSelections.presence = "hidden";

form1.page1.chairLawSelections.presence = "hidden";

  break;

}

Drop Down List 2

switch(xfa.event.newText)

{

  case "Chair":

  //DropDownList2.rawValue = null;

  //DropDownList2.clearItems();

  form1.page1.flowedOrderItems.childRockerSelections.presence = "hidden";

form1.page1.flowedOrderItems.lampSelection.presence = "hidden";

form1.page1.flowedOrderItems.chairMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.rockerMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.swivelChairSelects.presence = "hidden";

form1.page1.flowedOrderItems.rockerLawSelections.presence = "hidden";

form1.page1.chairSelections.presence = "visible";

form1.page1.rockerSelections.presence = "hidden";

form1.page1.chairLawSelections.presence = "hidden";

  break;

  case "Rocker":

  //DropDownList2.rawValue = null;

  //DropDownList2.clearItems();

  form1.page1.flowedOrderItems.childRockerSelections.presence = "hidden";

form1.page1.flowedOrderItems.lampSelection.presence = "hidden";

form1.page1.flowedOrderItems.chairMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.rockerMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.swivelChairSelects.presence = "hidden";

form1.page1.flowedOrderItems.rockerLawSelections.presence = "hidden";

form1.page1.chairSelections.presence = "hidden";

form1.page1.rockerSelections.presence = "visible";

form1.page1.chairLawSelections.presence = "hidden";

  break;

  case "Swivel Chair":

  //DropDownList2.rawValue = null;

  //DropDownList2.clearItems();

  form1.page1.flowedOrderItems.childRockerSelections.presence = "hidden";

form1.page1.flowedOrderItems.lampSelection.presence = "hidden";

form1.page1.flowedOrderItems.chairMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.rockerMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.swivelChairSelects.presence = "visible";

form1.page1.flowedOrderItems.rockerLawSelections.presence = "hidden";

form1.page1.chairSelections.presence = "hidden";

form1.page1.rockerSelections.presence = "hidden";

form1.page1.chairLawSelections.presence = "hidden";

  break;

  case "Child's Rocker":

  //DropDownList2.rawValue = null;

  //DropDownList2.clearItems();

  form1.page1.flowedOrderItems.childRockerSelections.presence = "visible";

form1.page1.flowedOrderItems.lampSelection.presence = "hidden";

  form1.page1.flowedOrderItems.chairMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.rockerMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.swivelChairSelects.presence = "hidden";

form1.page1.flowedOrderItems.rockerLawSelections.presence = "hidden";

form1.page1.chairSelections.presence = "hidden";

form1.page1.rockerSelections.presence = "hidden";

form1.page1.chairLawSelections.presence = "hidden";

  break;

  case "Lamp":

  //DropDownList2.rawValue = null;

  //DropDownList2.clearItems();

  form1.page1.flowedOrderItems.childRockerSelections.presence = "hidden";

form1.page1.flowedOrderItems.lampSelection.presence = "visible";

  form1.page1.flowedOrderItems.chairMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.rockerMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.swivelChairSelects.presence = "hidden";

form1.page1.flowedOrderItems.rockerLawSelections.presence = "hidden";

form1.page1.chairSelections.presence = "hidden";

form1.page1.rockerSelections.presence = "hidden";

form1.page1.chairLawSelections.presence = "hidden";

  break;

case "Medical School Seal Chair":

  //DropDownList2.rawValue = null;

  //DropDownList2.clearItems();

  form1.page1.flowedOrderItems.childRockerSelections.presence = "hidden";

form1.page1.flowedOrderItems.lampSelection.presence = "hidden";

form1.page1.flowedOrderItems.chairMedSelections.presence = "visible";

form1.page1.flowedOrderItems.rockerMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.swivelChairSelects.presence = "hidden";

form1.page1.flowedOrderItems.rockerLawSelections.presence = "hidden";

form1.page1.chairSelections.presence = "hidden";

form1.page1.rockerSelections.presence = "hidden";

form1.page1.chairLawSelections.presence = "hidden";

  break;

  case "Medical School Seal Rocker":

  //DropDownList2.rawValue = null;

  //DropDownList2.clearItems();

  form1.page1.flowedOrderItems.childRockerSelections.presence = "hidden";

form1.page1.flowedOrderItems.lampSelection.presence = "hidden";

form1.page1.flowedOrderItems.chairMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.rockerMedSelections.presence = "visible";

form1.page1.flowedOrderItems.swivelChairSelects.presence = "hidden";

form1.page1.flowedOrderItems.rockerLawSelections.presence = "hidden";

form1.page1.chairSelections.presence = "hidden";

form1.page1.rockerSelections.presence = "hidden";

form1.page1.chairLawSelections.presence = "hidden";

  break;

case "Law School Seal Chair":

  //DropDownList2.rawValue = null;

  //DropDownList2.clearItems();

  form1.page1.flowedOrderItems.childRockerSelections.presence = "hidden";

form1.page1.flowedOrderItems.lampSelection.presence = "hidden";

form1.page1.flowedOrderItems.chairMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.rockerMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.swivelChairSelects.presence = "hidden";

form1.page1.flowedOrderItems.rockerLawSelections.presence = "hidden";

form1.page1.chairSelections.presence = "hidden";

form1.page1.rockerSelections.presence = "hidden";

form1.page1.chairLawSelections.presence = "visible";

  break;

  case "Law School Seal Rocker":

  //DropDownList2.rawValue = null;

  //DropDownList2.clearItems();

  form1.page1.flowedOrderItems.childRockerSelections.presence = "hidden";

form1.page1.flowedOrderItems.lampSelection.presence = "hidden";

form1.page1.flowedOrderItems.chairMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.rockerMedSelections.presence = "hidden";

form1.page1.flowedOrderItems.swivelChairSelects.presence = "hidden";

form1.page1.flowedOrderItems.rockerLawSelections.presence = "visible";

form1.page1.chairSelections.presence = "hidden";

form1.page1.rockerSelections.presence = "hidden";

form1.page1.chairLawSelections.presence = "hidden";

  break;

}

MDawn

PDFGuru

25-08-2015

In my openion, Array makes the the task more complex.

Create all the radio button list separately and then try to acheive the solution using Hide/Unhide functionality.