surveyLabel: Add correct label for custom input types

View source: R/func_extend-shinysurveys.R

surveyLabelR Documentation

Add correct label for custom input types

Description

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.

Usage

surveyLabel()

Value

NA; used for side effects with extendInputType.

See Also

extendInputType

surveyID

surveyOptions

Examples


extendInputType("slider", {
shiny::sliderInput(
  inputId = surveyID(),
  label = surveyLabel(),
  min = 1,
  max = 10,
  value = 5
)
})


jdtrat/shinysurveys documentation built on April 22, 2022, 8:14 a.m.