- Posts: 16
- Thank you received: 2
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Hide/show answers depending on category (not array filter)
- Effenberg0x0
- Topic Author
- Offline
- New Member
Less
More
8 years 7 months ago #123550
by Effenberg0x0
Hide/show answers depending on category (not array filter) was created by Effenberg0x0
I have a Multiple Numeric Input question with a very specific problem. Examples below:
- I need it to only show the answer "Hardware" if the user checked "Computers", "Tablets" and/or "Monitors", etc in a previous question. If the user did not mentioned selling things that classify as Hardware previously, I like it to set Hardware to 0 and hide the "Hardware" answer.
- It should only show "Services" if the user checked "Support", "Maintenance", etc in a previous answer. Else, it should set "Services" to 0 and hide the answer.
As you can see, it's definitely not a direct array filter. Is it doable?
Thanks!
- I need it to only show the answer "Hardware" if the user checked "Computers", "Tablets" and/or "Monitors", etc in a previous question. If the user did not mentioned selling things that classify as Hardware previously, I like it to set Hardware to 0 and hide the "Hardware" answer.
- It should only show "Services" if the user checked "Support", "Maintenance", etc in a previous answer. Else, it should set "Services" to 0 and hide the answer.
As you can see, it's definitely not a direct array filter. Is it doable?
Thanks!
The topic has been locked.
- steve_81
- Offline
- Premium Member
Less
More
- Posts: 136
- Thank you received: 37
8 years 7 months ago #123552
by steve_81
Replied by steve_81 on topic Hide/show answers depending on category (not array filter)
Attachments:
The topic has been locked.
- Effenberg0x0
- Topic Author
- Offline
- New Member
Less
More
- Posts: 16
- Thank you received: 2
8 years 7 months ago #123556
by Effenberg0x0
Replied by Effenberg0x0 on topic Hide/show answers depending on category (not array filter)
It works! But it creates a weird problem. Now I get a lot of SGQA identifiers printed to the end of the question, in the place where it should present the sum of the numeric fields and how much was missing to sum 100%. See the attached screenshot:
Now I gotta find a way to still have the sum of numeric fields and remaining to 100%, but hide all this SGQA.
What am I doing wrong here?
Now I gotta find a way to still have the sum of numeric fields and remaining to 100%, but hide all this SGQA.
What am I doing wrong here?
Attachments:
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11746
- Thank you received: 2750
8 years 7 months ago #123558
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Hide/show answers depending on category (not array filter)
Can you post a copy of the relevant questions / question group here?
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.
- Effenberg0x0
- Topic Author
- Offline
- New Member
Less
More
- Posts: 16
- Thank you received: 2
8 years 7 months ago #123560
by Effenberg0x0
Replied by Effenberg0x0 on topic Hide/show answers depending on category (not array filter)
Sure, I exported the question to LSQ and attached it here. Let me know what else you need, or if you want an URL to access the survey.
I have just checked that when I add anything to the subquestion relevance of any answer, I get this weird output . If I clear the relevance fields for all answers, the weird output disappears and the sum/remaining of numeric fields starts working again.
Thank you so much for the support.
I have just checked that when I add anything to the subquestion relevance of any answer, I get this weird output . If I clear the relevance fields for all answers, the weird output disappears and the sum/remaining of numeric fields starts working again.
Thank you so much for the support.
Attachments:
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11746
- Thank you received: 2750
8 years 7 months ago #123561
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Hide/show answers depending on category (not array filter)
Have you tried it with a different template? I can see that you are not using one of the templates that comes with Limesurvey, but the one for Toolsforresearch. What happens if you switch to the default template?
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.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11746
- Thank you received: 2750
8 years 7 months ago #123562
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Hide/show answers depending on category (not array filter)
But only one question (.lsq) will not help, because this is based on more than one question, right? So please export the survey or at least the question group, that contains all relevant questions to make this work or reproduce the problem.
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.
- Effenberg0x0
- Topic Author
- Offline
- New Member
Less
More
- Posts: 16
- Thank you received: 2
8 years 7 months ago #123563
by Effenberg0x0
Replied by Effenberg0x0 on topic Hide/show answers depending on category (not array filter)
Attachments:
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11746
- Thank you received: 2750
8 years 7 months ago #123564
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Hide/show answers depending on category (not array filter)
I would assume that there is some kind of error in the template (probably some open "{" or something. Have a look in the source code of the template that generates the problem. And maybe have the user @Tammo informed. He is responsible for the tfr template and he might be able to look into this.
Um abraço desde São Paulo.
Um abraço desde São Paulo.
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.
- Effenberg0x0
- Topic Author
- Offline
- New Member
Less
More
- Posts: 16
- Thank you received: 2
8 years 7 months ago #123566
by Effenberg0x0
Replied by Effenberg0x0 on topic Hide/show answers depending on category (not array filter)
Maybe I can spot the problem by comparing the question in the default vs. TFR template using Chrome Dev Tools, if its something easy like a missing }. I'll definitely try that but for now I'll have to give up TFR and go back to the default template, I got like one hour to publish this survey...
Obrigado!
Obrigado!
The topic has been locked.
- tammo
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 962
- Thank you received: 216
8 years 7 months ago #123569
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Replied by tammo on topic Hide/show answers depending on category (not array filter)
Too bad ... we will certainly look into this!
Tammo
Tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
- tammo
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 962
- Thank you received: 216
8 years 7 months ago #123570
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Replied by tammo on topic Hide/show answers depending on category (not array filter)
If possible, can you send us the total survey (we will delete it after solving the problem)? At what point did this occur?
thanks in advance,
Tammo
tammo.terhark@toolsforresearch.com
thanks in advance,
Tammo
tammo.terhark@toolsforresearch.com
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.