Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

How record "Text display" randomization?

  • jjquestion
  • jjquestion's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 8 months ago - 4 years 8 months ago #187552 by jjquestion
How record "Text display" randomization? was created by jjquestion
I have several texts that should randomly displayed before participants answer some questions.

Let's say I have a pool of 50 texts, but each participant should just see one of them and then answer the same questions as everyone else with the other texts.

I followed this manual: www.limesurvey.org/forum/can-i-do-this-w...s-from-a-bucket-of-y and it works as expected. Always one of the 50 texts is displayed.

But how can I see which text was displayed? In the responses I just see an empty cell for all texts.

I even tried it with javascript after the text (type Text Display):
Code:
<script type="text/javascript" charset="utf-8">
  $(document).ready(function(){
    var record_test = 'text1';
    $('#question{QID} input[type="text"]').val(record_test);
  });
</script>

But I still didn't succeed to record which text was displayed.

Is there maybe even an easier solution?
Last edit: 4 years 8 months ago by jjquestion.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 8 months ago - 4 years 8 months ago #187555 by Joffm
Replied by Joffm on topic How record "Text display" randomization?
Hi,
different approach:
First question "multiple short text" (Q0) with your text as subquestions. Can be very long and may contain HTML tags.

Second question: equation to select a random number (r1) between 1 and the number of texts.

Third text display with micro-tayloring:
{if(r1==1,Q0_SQ001.question,if(r1==2,Q0_SQ002.questionif(r1==3,Q0_SQ003.question,if...))))}

And you have the selected text in the equation question.



Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 4 years 8 months ago by Joffm.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 8 months ago #187556 by holch
Replied by holch on topic How record "Text display" randomization?
The solution you use is for choosing X out of a bucked of Y. This is for questions and you will know which question was shown, if someone answered them. In your case, with text display, this won't work.

You would have to create a random number of 1-50 in a equation type question and then show/hide the texts via question relevance. then you'll know by the (random) number stored in the equation question which text respondents have seen.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose