Set condition when numbers are chosen in radioButtons

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)

Sorry, now that I saw that just do this in condition:

condition = "input.radio1 && input.radio2 && input.radio3

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.