Creates a page where the response is to be selected from a dropdown list.

dropdown_page(label, prompt, choices, alternative_choice = FALSE,
  alternative_text = "Other (please state)", save_answer = TRUE,
  validate = dropdown_page.validate(alternative_choice,
  alternative_text), on_complete = NULL, next_button_text = "Next",
  max_width_pixels = 200, admin_ui = NULL)

Arguments

label

Page label (character scalar).

prompt

Prompt to be displayed above the response choices. Can be either a character scalar (e.g. "What is 2 + 2?") or an object of class "shiny.tag", e.g. shiny::tags$p("What is 2 + 2?").

choices

Character vector of choices for the participant. If names are provided, then these names will be used for display, whereas the values will be stored in the results.

alternative_choice

Whether or not to give the participant the option of providing a free-text response instead of selecting one of the dropdown options.

alternative_text

Prompt for the free-text box (only relevant if alternative_choice is set to TRUE).

save_answer

See page.

validate

See page.

on_complete

See page.

next_button_text

Text to display on the next-page button (character scalar).

max_width_pixels

Maximum width of the response UI, in pixels.

admin_ui

See page.