checkboxGroupInput with conditionalPanel - comparing multiple check boxes from the same group

I have two checkboxGroupInputs. checkboxGroupInput-1 has four check boxes and the other checkboxGroupInput-2 can have many check boxes. I want to implement a conditionalPanel for the following conditions:

display conditionalPanel when:

  1. checkboxGroupInput-1 chkbx_1 and any check box from checkboxGroupInput-2 is checked.

  2. checkboxGroupInput-1 chkbx_2 and any check box from checkboxGroupInput-2 is checked.

  3. checkboxGroupInput-1 chkbx_1 and chkbx_2 and any check box from checkboxGroupInput-2 is checked.

I can get condition 1 and 2 to work but not 3.

The problem I am having is not knowing how to determine which check box is checked and how to compare individual values for the check boxes that are checked.

Example:

checkboxGroupInput(inputId = "ckboxgroup-1",
"ckbx_1" = "checkbox 1",
"ckbx_2" = "checkbox 2",
"ckbx_3" = "checkbox 3",
"ckbx_4" = "checkbox 4"
)

checkboxGroupInput(inputId = "ckboxgroup-2",
"ckbx_1" = "checkbox 1",
"ckbx_2" = "checkbox 2",
"ckbx_3" = "checkbox 3",
"ckbx_4" = "checkbox 4",
"ckbx_5" = "checkbox 5"
)
conditionalPanel(condition = 'length(input.ckboxgroup-2) !=0 && (input.ckboxgroup-1 == "checkbox 1" && input.ckboxgroup-1 == "checkbox 2" ')

If you cannot do this then what is the point of having a check box group if you cannot compare multiple checked boxes from the same group?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.