Description Usage Value Examples
View source: R/extend_shinysurveys.R
List all registered survey extensions
1 |
A named list containing the registered input type and their associated functions.
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()
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.