Questions

Details of all the question types that minno-quest supports

Shared properties

All question types share some basic properties:

propertydescription
type(text; default: ‘text’) Controls the question type. See the possible types below.
name(text) The name that this question is marked with when it is logged. Also allows you to refer to the question from within PIquest.
stem(text; default: ‘') The text for the question itself..
stemCssA css object to be applied to the stem.
description(text; default: ‘') Any additional text you want in order to extend the question description.
maxWidthForce question inputs to have this maximum width. The maxWidth must include an explicit measuring unit (for example ‘800px’ or ‘50%').
help(true or false; (default: false)) Whether to display the question help text.
helpText(text) The question help text. (Some questions have default help texts, some don’t).
lognow(true or false) Whether to log this questions when the page is submitted. This option is useful when you know that the question will not be accessed any more. It allows you to use the pulse option from the logger to send questions as they are being answered instead of sending only at the end of the task. (default: false)
errorMsg(Object: {}) This object has a property for each validation type. Setting the appropriate type changes the validation message. For instance setting the required property will change the validation message for instances where no response was given.

You may want to debug questions by setting the debug level in the manager to verbose. You will then be warned in the console if a question name is reused (note: sometimes a question is supposed to be reused, if this warning pops up just make sure the use case is correct).

Hooks

Questions have hooks that allow you to respond to many events in the life time of the question. Each hook is invoked with global, current and the question log.

propertydescription
onCreateAt the creation of the question.
onChangeAt each change of the question response (note that this hook may be called many times for each question).
onSubmitWhen the question is submitted.
onDeclineWhen the question is declined.
onTimeoutWhen the timer finishes.
onDestroyWhen the question is removed from the screen (either decline or submit).

For example, in case the participant made an error you can mark it on the current object:

var questions = {
	stem: 'Please write "Hello"',
	onSubmit: function(log, current){
		// if the question response is not correct
		if (log.response !== 'Hello'){
			// mark an arbitrary flag so that it may be accessed somewhere else
			current.error = true;
		}
	}
}

dropdown

Presents a dropdown that the user can use to select a single response.

Grid

The grid question allows you to group multiple “multiple choice” questions into a single table. This is often useful when asking several likert type questions using the same scale.

Info

The info question isn’t strictly a question. It allows you to use the common question properties in order to display information to the users.

multiGrid

The multiGrid question allows you to group multiple questions into a single table. This is often useful when you are asking a set of simple qustions repeatedly.

Rank

Ranking questions allow your subjects to sort a list of values.

selectOne & selectMulti

The selectOne and selectMulti questions present a list of possible response options for the user to pick from. The only difference between them is that selectMulti allows the user to select more than one response option.

Slider

The slider question presents a slider that allows the user to pick a response along a preassigned range.

Text & Textarea

The text and textarea questions consist of a simple text input in which the users can type in text. The difference between them is that text questions consist of a single line, whereas textareas are multiline.

textNumber

textNumber questions consist of a simple text input that limits the participant to numeric responses only.

Last modified March 11, 2021: fixing actions? (2e5870a)