Welcome to the LimeSurvey Community Forum

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

Randomization & fixed answer options

  • polbarbe95
  • polbarbe95's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 8 months ago #230669 by polbarbe95
Randomization & fixed answer options was created by polbarbe95
Please help us help you and fill where relevant:
Your LimeSurvey version: 5.3.25
Own server or LimeSurvey hosting: LimeSurvey Hosting
Survey theme/template: Fruity
==================
Good afternoon, 

I am trying to fix a certain number of answer options in a multiple choice question while doing randomization. Particularly I would like to fix answer options D, E & Other. I could manage to fix the Other option by implementing another code. However, I followed this manual  Workarounds: Manipulating a survey at runtime using Javascript - LimeSurvey Manual , implementing the randomization for multiple choice / radio list in the 3X version without success. The questions get randomized as I activated the randomization but none of the questions are fixed. 

Is there any update on that matter? 

Many thanks in advance.  

File Attachment:

File Name: limesurvey... (5).lss
File Size:63 KB

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 8 months ago #230675 by Joffm
Replied by Joffm on topic Randomization & fixed answer options
1. You didn't follow the instructions

LimeSurvey version 3.x:

  1. Set up your survey to use JavaScript
  2. Create a Multiple Options or List (radio) question with sequential response codes.

Sequential response codes means "1,2,3,4,..."

2. You should set "otherFixed" to TRUE

    // Set this to "true" if you want "Other" to be fixed in the last position
        var otherFixed = true;



  


Then everything is fine - without your first small script to move the "Other"

Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: polbarbe95

Please Log in to join the conversation.

  • polbarbe95
  • polbarbe95's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 8 months ago #230678 by polbarbe95
Replied by polbarbe95 on topic Randomization & fixed answer options
Many thanks Joffm. It worked now. I was not aware of the sequential meaning.

Please Log in to join the conversation.

  • polbarbe95
  • polbarbe95's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 8 months ago #230682 by polbarbe95
Replied by polbarbe95 on topic Randomization & fixed answer options
However, is there any way to fix a given X number of questions at the bottom? Well, the ones I have currently at the bottom, without adjusting the question code? Or else I will change the conditions so no worries!

Please Log in to join the conversation.

  • polbarbe95
  • polbarbe95's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 8 months ago #230685 by polbarbe95
Replied by polbarbe95 on topic Randomization & fixed answer options
Nevermind, I will stick to that solution:)

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 8 months ago #230709 by Joffm
Replied by Joffm on topic Randomization & fixed answer options

without adjusting the question code?

Sorry, which question code do you adjust.

I hope, not the 
var qID = {QID};

{QID} is a placeholder that always keeps the actrual question ID
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • polbarbe95
  • polbarbe95's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 8 months ago #230710 by polbarbe95
Replied by polbarbe95 on topic Randomization & fixed answer options
Hey Joffm,

I am referring to the answer options's codes (1,2,3...) Before I had non-sequential codes (001, 002). I have to replace them to make the code work.

I have not touched the var qID = {QID}; Thanks for the clarification though!

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose