- Posts: 14
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
"Multiple options" question with several primary and secundary options
- marba
- Topic Author
- Offline
- New Member
Less
More
8 years 10 months ago - 8 years 10 months ago #120496
by marba
"Multiple options" question with several primary and secundary options was created by marba
Hi all!
I have been using the workaround for secundary options in "multiple options" question , but it is configurated so as to open all the secundary options whenever a primary option is clicked.
That would work fine if only one of the answers would nest several secundary options, like:
Before clicking:
[]Primary 1
[]Primary 2
[]Primary 3
After clicking:
[]Primary 1
[X]Primary 2
....[]Secundary 2.1
....[]Secundary 2.2
[]Primary 3
For me, because every primary has several secundaries, what happens is that even if I click only one primary 1, all the other secundaries open. Like:
[X]Primary 1 (only this should open)
....[]Secundary 1.1
....[]Secundary 1.2
[]Primary 2
....[]Secundary 2.2
....[]Secundary 2.2
[]Primary 3
....[]Secundary 3.1
....[]Secundary 3.2
I thought that some code in the question itself could instruct the secundaries to remain hidden until the correspondent primary is selected, but my limited skills didn't allow me to solve this yet...
Any ideas on how to do it?
Thanks a lot!
I have been using the workaround for secundary options in "multiple options" question , but it is configurated so as to open all the secundary options whenever a primary option is clicked.
That would work fine if only one of the answers would nest several secundary options, like:
Before clicking:
[]Primary 1
[]Primary 2
[]Primary 3
After clicking:
[]Primary 1
[X]Primary 2
....[]Secundary 2.1
....[]Secundary 2.2
[]Primary 3
For me, because every primary has several secundaries, what happens is that even if I click only one primary 1, all the other secundaries open. Like:
[X]Primary 1 (only this should open)
....[]Secundary 1.1
....[]Secundary 1.2
[]Primary 2
....[]Secundary 2.2
....[]Secundary 2.2
[]Primary 3
....[]Secundary 3.1
....[]Secundary 3.2
I thought that some code in the question itself could instruct the secundaries to remain hidden until the correspondent primary is selected, but my limited skills didn't allow me to solve this yet...
Any ideas on how to do it?
Thanks a lot!
Last edit: 8 years 10 months ago by marba.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
8 years 10 months ago #120497
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 "Multiple options" question with several primary and secundary options
That should not happen. What LimeSurvey version and template?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- marba
- Topic Author
- Offline
- New Member
Less
More
- Posts: 14
- Thank you received: 0
8 years 10 months ago #120499
by marba
Replied by marba on topic "Multiple options" question with several primary and secundary options
Hi Tony,
Template based on default (just added this workaround on js and changed some css)
Version 2.05+
When I preview the question, that does not happen.
But when I run the whole survey, then it happens that the secondary options open.
I have this question type several times throughout the survey (some are the same question, repeated). And actually, in one of the questions this problem does not happen the first time it appears (later on the survey, the same question opens all the subquestions...).
Still I thought it could be something possible to change in the question itself...
Template based on default (just added this workaround on js and changed some css)
Version 2.05+
When I preview the question, that does not happen.
But when I run the whole survey, then it happens that the secondary options open.
I have this question type several times throughout the survey (some are the same question, repeated). And actually, in one of the questions this problem does not happen the first time it appears (later on the survey, the same question opens all the subquestions...).
Still I thought it could be something possible to change in the question itself...
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
8 years 10 months ago #120501
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 "Multiple options" question with several primary and secundary options
I cannot reproduce that in any browser. Please test with the attached multiple-question survey and template.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The topic has been locked.
- marba
- Topic Author
- Offline
- New Member
Less
More
- Posts: 14
- Thank you received: 0
8 years 10 months ago #120532
by marba
Replied by marba on topic "Multiple options" question with several primary and secundary options
I works fine with that example.
With my questions, it also works when I run then individually. If I run just one group (where these kind of questions exist), it's also fine. The problem is when I run the whole survey. Then the problem I explained happens.
And that is weird...
Besides the opening of all the secondary options, it's also not possible to close them again by unchecking the box.
Is there anything in conditions and survey flow that can change how these multiple-questions with secondary options work?
With my questions, it also works when I run then individually. If I run just one group (where these kind of questions exist), it's also fine. The problem is when I run the whole survey. Then the problem I explained happens.
And that is weird...
Besides the opening of all the secondary options, it's also not possible to close them again by unchecking the box.
Is there anything in conditions and survey flow that can change how these multiple-questions with secondary options work?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
8 years 10 months ago #120534
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 "Multiple options" question with several primary and secundary options
No, there is nothing in the survey flow that can change this workaround. There must be a JavaScript conflict in your template or in those groups.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- marba
- Topic Author
- Offline
- New Member
Less
More
- Posts: 14
- Thank you received: 0
8 years 10 months ago #120550
by marba
Replied by marba on topic "Multiple options" question with several primary and secundary options
Thanks a lot for your input Tony.
I copied the survey and tried the following changes:
- applied the demo-secondary-checkboxes template (to exclude some conflict in my template)
- deleted all the other questions that had Javascript (to exclude conflict with other pieces of js)
What remained:
- a survey with 7 groups
- conditions in a screening question
The problem persists...
Only when I removed the screening question (the survey questions only appear if the participant click "Yes" in that initial question) it started working normally!
But now I don't understand why... And several conditions are necessary throughout the survey.
Any more ideas? I'm quite confused now.
Thanks
I copied the survey and tried the following changes:
- applied the demo-secondary-checkboxes template (to exclude some conflict in my template)
- deleted all the other questions that had Javascript (to exclude conflict with other pieces of js)
What remained:
- a survey with 7 groups
- conditions in a screening question
The problem persists...
Only when I removed the screening question (the survey questions only appear if the participant click "Yes" in that initial question) it started working normally!
But now I don't understand why... And several conditions are necessary throughout the survey.
Any more ideas? I'm quite confused now.
Thanks
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
8 years 10 months ago #120551
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 "Multiple options" question with several primary and secundary options
Please attach a small test survey.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- marba
- Topic Author
- Offline
- New Member
Less
More
- Posts: 14
- Thank you received: 0
8 years 10 months ago #120561
by marba
Replied by marba on topic "Multiple options" question with several primary and secundary options
Here is goes.
thanks
thanks
Attachments:
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
8 years 10 months ago #120567
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 "Multiple options" question with several primary and secundary options
Ah, you failed to mention that you have exclusive options in these questions. The workaround is not designed to handle those. I'll need to give some thought to that.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: marba
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
8 years 10 months ago #120568
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 "Multiple options" question with several primary and secundary options
Ah, you failed to mention that you have exclusive options in these questions. The workaround is not designed to handle those. I'll need to give some thought to that.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- Bigred01
- Offline
- Premium Member
Less
More
- Posts: 88
- Thank you received: 33
8 years 10 months ago #120573
by Bigred01
Replied by Bigred01 on topic "Multiple options" question with several primary and secundary options
Are the exclusive options changing the display style of the inputs? I have had this happen to me before so instead of just using .hide(), i added a class to the hidden items that had display:none!important on it and removed that class when it was time to show them.
The topic has been locked.