Learn R Programming

shinysurveys (version 0.2.0)

surveyOptions: Add options for custom input types

Description

surveyOptions() is a helper function for extendInputType. When defining custom input types, the choices arguments for shiny UI components should equal surveyOption(). See examples for more details.

Usage

surveyOptions()

Arguments

Value

NA; used for side effects with extendInputType.

See Also

extendInputType

surveyID

surveyOptions

Examples

Run this code
# NOT RUN {
extendInputType("inlineRadioButtons", {
shiny::radioButtons(
  inputId = surveyID(),
  label = surveyLabel(),
  selected = character(0),
  choices = surveyOptions(),
  inline = TRUE
)
})

# }

Run the code above in your browser using DataLab