month_and_year_select_page: New month and year select page

View source: R/test_elements.R

month_and_year_select_pageR Documentation

New month and year select page

Description

Creates month and year select page.

Usage

month_and_year_select_page(
  label,
  prompt,
  save_answer = TRUE,
  min_year = 1930,
  max_year = 2013,
  show_month = TRUE,
  validate = month_and_year_select_page.validate(show_month),
  hide_response_ui = FALSE,
  response_ui_id = "response_ui",
  on_complete = NULL,
  admin_ui = NULL,
  failed_validation_message = psychTestR::i18n(ifelse(show_month,
    "SELECT_MONTH_AND_YEAR", "SELECT_YEAR"))
)

Arguments

label

Label for the current page (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?").

save_answer

Whether or not to save the answer.

validate

Validation function to execute.

hide_response_ui

Whether to begin with the response interface hidden (it can be subsequently made visible through Javascript, using the element ID as set in response_ui_id. See audio_NAFC_page for an example.).

response_ui_id

HTML ID for the response user interface.

on_complete

Optional function to execute on leaving the page (after successful validation). The argument list should include ..., and any of: state, the participant's state object; answer, the participant's most recent answer; input, the current page's Shiny input object; session, the current Shiny session object; opt, the test's option list as created by test_options().

admin_ui

Optional UI component for the admin panel.

failed_validation_message

Message to be displayed when validation fails.


klausfrieler/psyquest documentation built on Feb. 24, 2025, 11:20 p.m.