I am trying to create a conditionalPanel that displays when a preceding input is filled out. I want the conditionalPanel to populate with choices based on the initial input.
My code looks something like this:
selectInput("initialvalue", "Initial Value", c("Choose one" = "", as.character(initialvaluelist))),
conditionalPanel(
condition = "input.initialvalue=='First Option'",
selectInput("conditionalchoices", "Conditional Choices", choices = c("Click to select from list" = "", firstoptionchoices), selected = NULL, multiple=TRUE)),
conditionalPanel(
condition = "input.initialvalue=='Second Option'",
selectInput("conditionalchoices", "Conditional Choices", choices = c("Click to select from list" = "", secondoptionchoices), selected = NULL, multiple=TRUE))
In this example, choosing First Option would pull up firstoptionchoices and choosing Second Option would pull up secondoptionchoices.
This works in the UI, but only the first conditionalPanel condition updates the reactive variable. The second one does not. What am I missing?