I would like to make an adjustment in condition = "input.radio1 == '2'&& input.radio2 == '2' && input.radio3 == '2'".
Note that the condition is only displayed when option 2 is selected on both radioButtons
. Now I want to adjust so that it works for any choice of radiobutton1
, radiobutton2
and radiobutton3
, not just option 2
.
Executable code below:
library(shiny)
library(shinythemes)
ui <- bootstrapPage(
navbarPage(theme = shinytheme("flatly"), collapsible = TRUE,
"Cl",
tabPanel("Solution",
sidebarLayout(
sidebarPanel(
radioButtons("radio1", label = h3("Choose 1"),
choices = list("Option1" = 2, "Option2" = 3, "Option3" = 4),
selected = ""),
radioButtons("radio2", label = h3("Choose 2"),
choices = list("Option4" = 2, "3 clusters" = 3, "Option5" = 4),
selected = ""),
radioButtons("radio3", label = h3("Choose 3"),
choices = list("Option6" = 2, "Option1" = 3, "Option8" = 4),
selected = ""),
conditionalPanel(
condition = "input.radio1 == '2'&& input.radio2 == '2' && input.radio3 == '2'",
tags$hr(style="border-color: black;"),
tags$p(h3("Are you satisfied with this solution?")),
radioButtons( "satisfaction","", choices = list("Yes" = 1,"Not " = 2),selected = 1))
),
mainPanel(
tabsetPanel(
)))
)))
server <- function(input, output, session) {
}
shinyApp(ui = ui, server = server)