- Posts: 6
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
random question
- violass
- Topic Author
- Offline
- New Member
Less
More
7 years 4 months ago #145926
by violass
random question was created by violass
Hi,
I have a multiple choice question, for example
Q1. What's your favourite fruit?
1) apple
2) orange
3) banana
4) pear
I need that appear two questions randomly selected as array type.
All questions are on separate pages.
Thanks
I have a multiple choice question, for example
Q1. What's your favourite fruit?
1) apple
2) orange
3) banana
4) pear
I need that appear two questions randomly selected as array type.
All questions are on separate pages.
Thanks
The topic has been locked.
- tpartner
- Away
- LimeSurvey Community Team
Less
More
- Posts: 10100
- Thank you received: 3589
7 years 4 months ago #145935
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic random question
If I get your question correctly, you may be able to use a modification of this workaround to select two random responses from a multiple choice question -
www.limesurvey.org/forum/can-i-do-this-w...?limitstart=0#143140
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- violass
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
7 years 4 months ago #145941
by violass
Replied by violass on topic random question
Thanks!
I try the "Demo - Select 2 Random Options From Multi-Choice (ID:264794)" but it doesn't work.
Sorry but I don't know the java language. :laugh:
Can you tell me what I have to modify?
I try the "Demo - Select 2 Random Options From Multi-Choice (ID:264794)" but it doesn't work.
Sorry but I don't know the java language. :laugh:
Can you tell me what I have to modify?
The topic has been locked.
- tpartner
- Away
- LimeSurvey Community Team
Less
More
- Posts: 10100
- Thank you received: 3589
7 years 4 months ago #145953
by tpartner
What LimeSurvey version are you using?
Are there any JavaScript errors in the console?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic random question
It works for me in LS version 2.57.1.I try the "Demo - Select 2 Random Options From Multi-Choice (ID:264794)" but it doesn't work.
What LimeSurvey version are you using?
Are there any JavaScript errors in the console?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- violass
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
7 years 4 months ago #145956
by violass
Replied by violass on topic random question
Now it works in LS version 2.50+.
Thank you!
Thank you!
The topic has been locked.
- violass
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
7 years 4 months ago #145970
by violass
Replied by violass on topic random question
All my questions are on separate pages. How can I modify script?
The topic has been locked.
- tpartner
- Away
- LimeSurvey Community Team
Less
More
- Posts: 10100
- Thank you received: 3589
7 years 4 months ago - 7 years 4 months ago #145972
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic random question
You can't, JavaScript can only work on questions within a single page.
Run the survey in group-by-group and place all questions except the hidden one in separate groups.
Run the survey in group-by-group and place all questions except the hidden one in separate groups.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 7 years 4 months ago by tpartner.
The topic has been locked.
- DenisChenu
- Away
- LimeSurvey Community Team
Less
More
- Posts: 13622
- Thank you received: 2488
7 years 4 months ago #145993
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic random question
I don't understand :
- select X fruit
- Show 2 array question at random
What is the relation ?
- select X fruit
- Show 2 array question at random
What is the relation ?
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- violass
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
7 years 4 months ago #146001
by violass
Replied by violass on topic random question
Ok, I understand!
I run the survey in group-by-group and now it works.
Thank you again.
I run the survey in group-by-group and now it works.
Thank you again.
The topic has been locked.