if (interactive()) {
library(surveydown)
# Use sd_show_if() to conditionally show/hide questions:
# server <- function(input, output, session) {
# sd_show_if(
# input$has_car == "yes" ~ "car_make",
# input$employed == "yes" ~ "job_title",
# input$age >= 18 ~ "adult_questions_page"
# )
# sd_server()
# }
# Find a working directory and start from a template:
sd_create_survey(template = "conditional_showing")
# This creates survey.qmd and app.R - launch the survey using app.R
}
Run the code above in your browser using DataLab