Create a multiple choice/select question
question_multi( prompt, options, horizontal = FALSE, required = FALSE, name = NULL )
the prompt for the question
character vector of options
should radio buttons be laid out horizontally?
is a response to the question required?
a convenient label for the question
question_multi() function is designed to be called when
trial_survey_multi_choice() to construct a survey page that
contains multiple choice items, or
construct one with multi-selection items.
When rendered as part of the study, the text specified
prompt argument is shown to the participant, with a set of
options presented either as radio buttons (for a multiple choice trial) or
checkboxes (for a multiple selection trial). The text placed adjacent to the
response options is specified by the
options argument, and by default
the options are laid out vertically. A horizontal arrangement can be
produced by setting
horizontal = TRUE. If
required = TRUE the
participant will not
be allowed to continue to the next trial unless an answer is provided.
name argument should be a string that provides a convenient
label for the question. If left unspecified, jsPsych defaults to labelling
the questions within a survey page as "Q0", "Q1", "Q2", etc.