i have two select input in my UI.R library(shiny)
ContextElements = c("choice1", "choice2", "choice3")
shinyUI(pageWithSidebar(
headerPanel(""),
sidebarPanel(
h4("test for selectize input"),
selectizeInput(inputId = "firstAxe", label = h4("First Axe"),
choices=ContextElements, selected = NULL, multiple = FALSE,
options = NULL),
hr(),
selectizeInput(inputId = "twoAxe", label = h4("Second Axe"),
choices=NULL, selected = NULL, multiple = FALSE,
options = NULL)
),
mainPanel(
)
))
i want that the next selectizeinput choices ("twoAxe") to be filled dynamically with the remained choices drom the first one, that's mean if i choosed the first choice if the first one, the second choices will be choice2 and choice3
Thanks
ContextElements_new <- ContextElements[!(ContextElements %in% input$firstAxe)]But this is just a guess and would require a bit of tinkering. Someone may be able to provide a better answer. Or you could include the reproducible code for the server.R and UI.r and a better/correct solution could come of it. - Andrew Taylor