Possible to update helpText dynamically?

653 views
Skip to first unread message

tcash21

unread,
Aug 27, 2013, 9:50:13 AM8/27/13
to shiny-...@googlegroups.com
I was going to use updateTextInput() but helpText elements don't have their own IDs. They only add text elements to an existing input.

By the way here's my official app and blog post! Thank you all for your help and patience.

Ramnath Vaidyanathan

unread,
Aug 27, 2013, 11:26:29 AM8/27/13
to shiny-...@googlegroups.com
You can use renderUI on the server side to display dynamic helpText.

Here is an example

require(shiny)
runApp(list(
ui = pageWithSidebar(
headerPanel('Dynamic Help Text'),
sidebarPanel(
selectInput("mypanel", 'Choose Panel', c('A', 'B')),
uiOutput('helptext')
),
mainPanel(
)
),
server = function(input, output){
output$helptext <- renderUI({
switch(input$mypanel,
A = helpText('This is help text A'),
B = helpText('This is help text B')
)
})
}
))
Reply all
Reply to author
Forward
0 new messages