listInputExtensions: List all registered survey extensions

Description Usage Value Examples

View source: R/extend_shinysurveys.R

Description

List all registered survey extensions

Usage

1

Value

A named list containing the registered input type and their associated functions.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
if (interactive()) {

  # Register a date input to {shinysurveys},
  # limiting possible dates to a twenty-day period.

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

  # Register a slider input to {shinysurveys}
  # with a custom minimum and maximum value.

  extendInputType("date", {
    shiny::dateInput(
      inputId = surveyID(),
      value = Sys.Date(),
      label = surveyLabel(),
      min = Sys.Date()-10,
      max = Sys.Date()+10
    )
  })

  listInputExtensions()

}

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