surveyLabel() is a helper function for extendInputType. When defining custom input types, the label argument for shiny UI components should equal surveyLabel(). It essentially takes on the value in the "question" column in the data supplied to surveyOutput. See examples for more details.

surveyLabel()

Value

NA; used for side effects with extendInputType.

Examples


extendInputType("slider", {
shiny::sliderInput(
  inputId = surveyID(),
  label = surveyLabel(),
  min = 1,
  max = 10,
  value = 5
)
})
#> Input Type "slider" registered with {shinysurveys}. If the session restarts, you will need to re-register it.
#> To see all registered input extensions, please call `shinysurveys::listInputExtensions()`.