title: How to enable/disable specific radiogroupbuttons in shiny, shinyjs, shinywidget
body: <p>I have a set of groupradiobuttons, and I would like to have control over which specific buttons a user is allowed to press - without having to make them all separate radio buttons and not simply disabling the whole group. E.g., in the case below, I have made it so that when you select an option other than 'None' from the 'disabler' selectinput, it disables all the buttons. But I would like to know how to make it so that the specific selection of what to enable/disable can specifically enable/disable a specific one of the radio buttons. Any help would be much appreciated!</p>
  <pre><code>library(shiny)
  library(shinyWidgets)
  library(shinyjs)
  
  ui &lt;- fluidPage(
    
    useShinyjs(),
    
    selectInput(&quot;disabler&quot;,
                label = &quot;Choose button to disable&quot;,
                choices = c(&quot;None&quot;, &quot;1&quot;, &quot;2&quot;, &quot;3&quot;, &quot;4&quot;, &quot;5&quot;)),
    
    radioGroupButtons(&quot;buttons&quot;,
                               label = &quot;Here are the buttons:&quot;,
                               selected = &quot;1&quot;,
                               choiceNames = c(&quot;1&quot;, &quot;2&quot;, &quot;3&quot;, &quot;4&quot;, &quot;5&quot;),
                               choiceValues = c(&quot;1&quot;, &quot;2&quot;, &quot;3&quot;, &quot;4&quot;, &quot;5&quot;),
                               individual = FALSE)
    )
  
  server &lt;- function(input, output, session) {
    
    observeEvent(input$disabler, {
      if(input$disabler == &quot;None&quot;) {
        shinyjs::enable(&quot;buttons&quot;)
      } 
      else if(input$disabler != &quot;None&quot;) {
        shinyjs::disable(&quot;buttons&quot;)
      }
    })
     
    
  }
  
  shinyApp(ui = ui, server = server)
  </code></pre>