question.multiple: Define a multiple-choice question.

Description Usage Arguments See Also

View source: R/question.R

Description

question.multiple returns a question definition that displays responses as check-boxes or as a combo-box, allowing for the selection of multiple responses.

Usage

1
2
question.multiple(id, label, responses, required = TRUE, use.select = FALSE,
  inline = FALSE, width = NULL, placeholder = NULL)

Arguments

id

(character) the unique identifier of the question; it will be used as the column name in the data.frame returning the questionnaire data and when prefixed with 'question' - as the inputId for the input slot. Note: multiple responses will be coded in a single data.frame column as comma-separated response identifiers.

label

(character) the text displayed as the header of the question.

responses

(response list) the response list giving the identifiers and labels of all responses (e.g. as returned by buildResponses).

required

(logical) if FALSE, the respondent is free to not choose a response; if TRUE, the respondent must select a response before moving on to subsequent pages of the questionnaire.

use.select

(logical) if FALSE, displays check-boxes; if TRUE, displays a combo-box with all responses available through the drop-down list.

inline

(logical) if FALSE, check-boxes will be displayed vertically; if TRUE, controls will be displayed horizontally. If use.select == TRUE, this argument will be ignored.

width

(character) the width of the input, e.g. '400px' or '100%'.

placeholder

(character) the text that will be displayed in the combo-box when there are no responses selected yet; defaults to "Click to select responses". If use.select == FALSE, this argument will be ignored.

See Also

buildResponses, checkboxGroupInput, radioButtons, selectInput.

Other question definitions: question.mixed, question.numeric, question.single, question.text


mtrybulec/interviewer documentation built on May 23, 2019, 8:20 a.m.