Welcome, Guest
Username: Password: Remember me

TOPIC: Hide answer item in Ranking question.

Hide answer item in Ranking question. 1 year 11 months ago #86540

  • isme_tze
  • isme_tze's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Karma: 0
Hi LS expert,

I need to pipe multiple question from two question groups to a ranking question (as per here).

I come up with another possible workaround. I create a ranking question with all the product in the answer list. the question is, the code does not work and I dont know where (I am new to Javascript) is wrong. please see the following diagram for the code and conceptual/logical framework.

LS_qs_2012-10-06.jpg


it will be great if anyone can help.

Thank you very much and your help is much appreciated.

Regards
Tze
The administrator has disabled public write access.

Re: Hide answer item in Ranking question. 1 year 11 months ago #86553

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
1. Which Limesurvey version do you use?

2. Are you using some special layout at this survey? Because usually you can't mix different question types.

3. When using Limesurvey 1.92 or later, try using the "array filter" feature to filter the list radio question.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
The following user(s) said Thank You: isme_tze

Re: Hide answer item in Ranking question. 1 year 11 months ago #86574

  • isme_tze
  • isme_tze's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Karma: 0
Thanks Mazi,

I really appreciate your help.

"1. Which Limesurvey version do you use?"
I am using LS Version 1.92+ Build 120405. I am a "normal user" who cant change any setting on LS. I cant even use EM due to "security" reason. According to IT department, EM is only available to LS admins.

"2. Are you using some special layout at this survey? Because usually you can't mix different question types."
Yes. QG1 and QG2 is using this workaround. Demo - here.

My QG1 and QG2 is working correctly. I have all products name (as well as the answer code) from QG1 and QG2 added to the QG3 ranking question. The script below (script is placed in ranking question, question section) should:-
1. check the whether a product (such as Product C in QG1) from QG1 and QG2 is ticked or not
2. if it is NOT ticked, hide the product (Product C) in the ranking question - answer list

"3. When using Limesurvey 1.92 or later, try using the "array filter" feature to filter the list radio question. "
Please correct me if I am wrong. "Array filter" only work on one question that have multiple answers. The workaround that I used in QG1 and QG2, each multiple choice question only contain ONE answer. And therefore, every "Product A, B, C, D, ... and so on" is a separate question.

I have rework the diagram and hope to explain better.
LS-1_2012-10-07.JPG


The main question of the post is to know how to hide an answer item in the answer list (in ranking question) if a check box of the previous question is not ticked.

Thank you very much and hope to hear from you soon.

Regards
Tze
The administrator has disabled public write access.

Re: Hide answer item in Ranking question. 1 year 11 months ago #86590

  • isme_tze
  • isme_tze's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Karma: 0
Can anyone help, please?

does anyone know what is the code to hide the an answer item in the ranking question?

your help is much appreciated.

Regards
Tze
The administrator has disabled public write access.

Re: Hide answer item in Ranking question. 1 year 11 months ago #86591

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
Please correct me if I am wrong. "Array filter" only work on one question that have multiple answers.

Actually, you can use array filter to combine together responses from multiple prior questions. As it says in the documentation:

Starting in 1.92, you can enter multiple array_filter options for a single question, separated by semicolons

So, if your ranking question has options Product A-D and Product 11-44, list all of them as sub-questions for the ranking question. Then, assuming your questions for A-D and 11-44 are called q1 and q2, respectively, the array filter would be:
q1;q2

Again, 2.0 automatically supports filtering of ranking questions. 1.92 does not. So, rather than trying to extensively customize 1.92, you might want to consider upgrading to 2.0.
The administrator has disabled public write access.

Re: Hide answer item in Ranking question. 1 year 11 months ago #86597

  • isme_tze
  • isme_tze's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Karma: 0
Hi TMSWhite,

Thanks for you reply. i really appreciate it.

I CANT NOT use array filter as this is not enable in our LS 1.92 and I DONT HAVE admins right to make any change to LS. I CAN NOT add/change anything on template.js file. I CAN NOT update/upgrade LS. The code tpartner sent me the other doesn't even work on our LS server (please see here

the question structure for Question Group (QG) 1 (as well as QG2) are in the following structure:
QG1:
Q1 plater
Q2 Product A (MCQ with only one answer)
Q3 Dropdown list
Q4 Dropdown list
Q5 Dropdown list
Q6 Product B (MCQ with only one answer)
Q7 Dropdown list
Q8 Dropdown list
Q9 Dropdown list
Q10 Product C (MCQ with only one answer)
Q11 Dropdown list
Q12 Dropdown list
Q13 Dropdown list
Q14 Product D (MCQ with only one answer)
Q15 Dropdown list
Q16 Dropdown list
Q17 Dropdown list
... and so on

QG2:
Q1 plater
Q2 Product 11 (MCQ with only one answer)
Q3 Dropdown list
Q4 Dropdown list
Q5 Dropdown list
Q6 Product 22 (MCQ with only one answer)
Q7 Dropdown list
Q8 Dropdown list
Q9 Dropdown list
Q10 Product 33 (MCQ with only one answer)
Q11 Dropdown list
Q12 Dropdown list
Q13 Dropdown list
Q14 Product 44 (MCQ with only one answer)
Q15 Dropdown list
Q16 Dropdown list
Q17 Dropdown list
... and so on


Since I have all the limitation mentioned above, i believe the best way is to make a script to filter the each question individually. Such as:

QG3
Q1 Ranking number (script to check if QG1 Q2 is NOT checked, hide Ans1; if QG1 Q6 is NOT checked hide Ans2; and so on...)
Ans1 Product A
Ans2 Product B
Ans3 Product C
and so on...
Ans22 Product 11
Ans23 Product 22
Ans24 Product 33
and so on...


I believe (I do really hope) it can be done this way.

Regards
Tze
The administrator has disabled public write access.

Re: Hide answer item in Ranking question. 1 year 11 months ago #86640

  • isme_tze
  • isme_tze's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Karma: 0
help from anyone? please.
The administrator has disabled public write access.

Re: Hide answer item in Ranking question. 1 year 11 months ago #86698

  • isme_tze
  • isme_tze's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Karma: 0
nobody is able to help? so unreal....
The administrator has disabled public write access.

Re: Hide answer item in Ranking question. 1 year 11 months ago #86715

  • isme_tze
  • isme_tze's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Karma: 0
anyone?
The administrator has disabled public write access.

Re: Hide answer item in Ranking question. 1 year 11 months ago #86852

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
isme_tze wrote:
I CANT NOT use array filter as this is not enable in our LS 1.92 and I DONT HAVE admins right to make any change to LS. I CAN NOT add/change anything on template.js file. I CAN NOT update/upgrade LS.
Have a look at www.limesurvey.com to ask for professional help and alternative Limesurvey hosting since your company/university/boss doesn't seem to offer much help.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.174 seconds
Donation Image