question.text: Define a question that allows text entry.

Description Usage Arguments See Also

View source: R/question.R

Description

question.text returns a question definition that uses an input line or text area for entry of text values.

Usage

1
2
3
question.text(id, label, required = TRUE, use.textArea = FALSE,
  width = NULL, height = NULL, rows = NULL, placeholder = NULL,
  regex = NULL, regexHint = 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.

label

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

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.textArea

(logical) if FALSE, displays a single-row edit line; if TRUE, displays a larger text area.

width

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

height

(character) the height of the input, e.g. '400px' or '100%'. If use.textArea == FALSE, this argument is ignored.

rows

(character) the height of the input in text rows. If use.textArea == FALSE, this argument is ignored. If height is set, this argument is ignored.

placeholder

(character) the text that will be displayed in the edit line when no text is entered yet.

regex

(character) a regular expression that can be used to validate the entered value.

regexHint

(character) a human-readable description of the regular expression to be displayed when the entered value doesn't match the regex. If regex is not set, this argument is ignored.

See Also

textAreaInput, textInput.

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


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