Yes/No

Ask a single yes/no question

yesNo is a task that allows you to ask your users simple yes/no questions without resorting to a full fledged questionnaire.

A typical yesNo task may look like this:

{
    type:'yesNo',
    heading: 'Task length',
    text: 'Would you like to participate in the long task (15min), or in the short one (5min)',
    yesText: 'The long one',
    noText: 'The short one',
    path: 'longOrShort'
}

After completing the task, the global property longOrShort will be set with true or false according to the response of the user. This value can be used later within the player in order to branch or within templates.

Note that the value recorded is not posted to the server. (If you are interested in posting it to the server, you may want to look into the post task).

The API is as follows:

propertydescription
headingA bold heading for the questions (String)
textThe actual text of the question (String)
yesTextThe text for the true value button (String)
noTextThe text for the false value button (String)
pathThe property name within global to which to save the data. Values with dots (i.e. ‘$meta.isTouch’) will be logged to the propery they are pointing to via lodash set
Last modified March 11, 2021: setup hugo (11980dc)