0

I am new to jsPsych and wonder if there is a way to enable forced choice in the jsPsychSurveyLikert in 7.1.2. I want to avoid missing data and therefore I would like to specify this. For example for jsPsychMultiChoice it is possible to do this by setting required to true.

Here is a reproducible example:

var trial = {
    type: jsPsychSurveyLikert,
    required: true,
    questions: [
        {prompt: '"Do you cook?"', labels: ["Yes","No"]}
    ]
} 

Thank you very much for helping me!

CapsLock
  • 11
  • 3

1 Answers1

0

You can set the required parameter inside the questions, like this:

var trial = {
    type: jsPsychSurveyLikert,
    questions: [
        {prompt: '"Do you cook?"', labels: ["Yes","No"], required: true}
    ]
}

This allows you to make some questions required and others optional.

Josh
  • 2,105
  • 1
  • 14
  • 14