jspsych / jsPsych

Create behavioral experiments in a browser using JavaScript
http://www.jspsych.org
MIT License
1.05k stars 679 forks source link

How do I present survey-likert items randomly across several pages? #3409

Open SaoirseConnorDesai opened 1 month ago

SaoirseConnorDesai commented 1 month ago

I have a questionnaire with 24 items that I am currently presenting as a single item on each page as below:

const CSTQ_procedure = { timeline: [ { type: 'survey-likert', questions: [{ prompt: jsPsych.timelineVariable('question'), function(){ const html =

`; return html; }, labels: likert_labels, required: true }], scale_width: 1000, data: { id: jsPsych.timelineVariable("id"), question: jsPsych.timelineVariable("question"), trial_part: 'CSTQ_questionnaire' }, } ], timeline_variables: [ {id: 1, question: "It is important to be loyal to your beliefs even when evidence is brought to bear against them."}, {id: 2, question: "Whether something feels true is more important than evidence"}, {id: 3, question: "Just because evidence conflicts with my current beliefs does not mean my beliefs are wrong"}, {id: 4, question: "There may be evidence that goes against what you believe but that does not mean you have to change your beliefs"}, {id: 5, question: "Even if there is concrete evidence against what you believe to be true, it is OK to maintain cherished beliefs."}, {id: 6, question: "Regardless of the topic, what you believe to be true is more important than evidence against your beliefs."}, {id: 7, question: "I think there are many wrong ways, but only one right way, to almost anything."}, {id: 8, question: "In my experience, the truth is often black and white."}, {id: 9, question: "Truth is never relative."}, {id: 10,question: "The truth does not change."}, {id: 11,question: "Either something is true or it is false; there is nothing in-between."}, {id: 12,question: "There is no middle ground between what is true and what is false."}, {id: 13,question: "I like to rely on my intuitive impressions."}, {id: 14,question: "I believe in trusting my hunches."}, {id: 15,question: "When I make decisions, I tend to rely on my intuition."}, {id: 16,question: 'Using my “gut-feelings” usually works well for me in figuring out problems in my life.'}, {id: 17,question: "Intuition is the best guide in making decisions."}, {id: 18,question: "I often go by my instincts when deciding on a course of action."}, {id: 19,question: "I’m not that good at figuring out complicated problems."}, {id: 20,question: "Thinking is not my idea of an enjoyable activity."}, {id: 21,question: "I try to avoid situations that require thinking in depth about something."}, {id: 22,question: "I am not a very analytical thinker."}, {id: 23,question: "Reasoning things out carefully is not one of my strong points."}, {id: 24,question: "Thinking hard and for a long time about something gives me little satisfaction."} ], randomize_order: true };` This is a bit cumbersome for participants to click through as they need to click the Continue button as well. However, when I tried this the standard way then there are 24 items on a page. Does anyone know of a way to present the items in blocks of 6 or 12 on a page but still randomise the order? ```[tasklist] ### Tasks ```
DominiqueMakowski commented 3 weeks ago

I would use the survey plugin instead that allows for multiple pages