if (interactive()) {
library(surveydown)
# Use sd_skip_if() to skip pages based on answers:
# server <- function(input, output, session) {
# sd_skip_if(
# input$age < 18 ~ "underage_page",
# input$country == "USA" ~ "usa_page",
# input$consent == "no" ~ "exit_page"
# )
# sd_server()
# }
# Find a working directory and start from a template:
sd_create_survey(template = "conditional_skipping")
# This creates survey.qmd and app.R - launch the survey using app.R
}
Run the code above in your browser using DataLab