surveyOptions: Add options for custom input types

Description Usage Value See Also Examples

View source: R/extend_shinysurveys.R

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

1

Value

NA; used for side effects with extendInputType.

See Also

extendInputType

surveyID

surveyOptions

Examples

1
2
3
4
5
6
7
8
9
extendInputType("inlineRadioButtons", {
shiny::radioButtons(
  inputId = surveyID(),
  label = surveyLabel(),
  selected = character(0),
  choices = surveyOptions(),
  inline = TRUE
)
})

shinysurveys documentation built on July 11, 2021, 9:06 a.m.