I'm working on a basic Shiny UI template where the user has to pick a certain button in order to give the app input. Right now I'm using a conditionalPanel() but instead of the input buttons going away completely, is it possible to gray them out?
Here's the following code:
library(shiny)
library(shinyjs)
ui<-fluidPage(
headerPanel("Title"),
sidebarPanel(
radioButtons("toggle", "Some Buttons",
choices = list("Choice 1" = 1,
"Choice 2" = 2),
selected = "Choice 2")),
conditionalPanel(
condition = "input.toggle % 2 == 0",
sidebarPanel(radioButtons("otherButtons","Buttons",
choices = list("Choice 1"=1,
"Choice 2"=2)),
radioButtons("moreButtons","Buttons",
choices = list("Choice 1"= 1,
"Choice 2" = 2))
),
"Some Text"
)
)
server<-function(input,output,session){
}
shinyApp(ui,server)