Create a multiple choice/select question
question_multi( prompt, options, horizontal = FALSE, required = FALSE, name = NULL )
prompt | the prompt for the question |
---|---|
options | character vector of options |
horizontal | should radio buttons be laid out horizontally? |
required | is a response to the question required? |
name | a convenient label for the question |
A question object to be passed to trial_survey_multi_choice()
or trial_survey_multi_select()
.
The question_multi()
function is designed to be called when
using trial_survey_multi_choice()
to construct a survey page that
contains multiple choice items, or trial_survey_multi_select()
to
construct one with multi-selection items.
When rendered as part of the study, the text specified
by the 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.
The 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.
Survey page trials are constructed using the trial_survey_text
,
trial_survey_likert
, trial_survey_multi_choice
and
trial_survey_multi_select
functions. Individual questions for survey
trials can be specified using question_text
,
question_likert
and question_multi
.