Welcome to the LimeSurvey Community Forum

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

In Array(Number) Question Can Apply Logic Answer Option

More
3 weeks 1 hour ago - 3 weeks 1 hour ago #274980 by rajkumar_dms
Please help us help you and fill where relevant:
Your LimeSurvey version: [6.17.17]
Own server or LimeSurvey hosting:Cloud
Survey theme/template:
==================
Hello,

I have matrix question with multiple check boxed question but i want to apply logic for some subquestion we need show some answer option not all answer option ,for this please look into the attachment (Black means not to show these option for particular brand) and then the option selected for particular subestion then only that option only shows in the next question 
 

 
Last edit: 3 weeks 1 hour ago by rajkumar_dms.

Please Log in to join the conversation.

More
3 weeks 1 hour ago #274981 by jelo
That is not supported out of the box
If you want help to implement that question you will raise your chances if you provide the LimeSurvey version you use and a LSS export with exact that one question as far as you have it implemented.

Personally I wouldn't present such big array questions. The drop out rate is very high and mobile devices won't be able to show them in that way.
Good luck.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in to join the conversation.

More
3 weeks 1 hour ago #274982 by rajkumar_dms
We are using cloud version 6.17.17
here is lss file

Please Log in to join the conversation.

More
3 weeks 1 hour ago #274983 by Joffm
So, you want to achieve something like this
 

This is quite easy to implement
Code:
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
    // Remove in row 1
    $('#question{QID} tr[id^="javatbd"]:eq(0) .checkbox-item:eq(0) *').remove();
    $('#question{QID} tr[id^="javatbd"]:eq(0) .checkbox-item:eq(1) *').remove();
 
    // Remove in row 6
  $('#question{QID} tr[id^="javatbd"]:eq(5) .checkbox-item:eq(3) *').remove();
   $('#question{QID} tr[id^="javatbd"]:eq(5) .checkbox-item:eq(4) *').remove();
 
   // Remove in row 7
  $('#question{QID} tr[id^="javatbd"]:eq(6) .checkbox-item:eq(0) *').remove();
   $('#question{QID} tr[id^="javatbd"]:eq(6) .checkbox-item:eq(1) *').remove();
   $('#question{QID} tr[id^="javatbd"]:eq(6) .checkbox-item:eq(3) *').remove();
   $('#question{QID} tr[id^="javatbd"]:eq(6) .checkbox-item:eq(4) *').remove();
});
</script>

Well, I will have a look at your lss.
But - as jelo - it might be difficult to display such a question.

Joffm
 

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

Please Log in to join the conversation.

More
3 weeks 54 minutes ago - 3 weeks 52 minutes ago #274984 by Joffm
What do you want to display in question D?
And how do you expect the array filter on question C to work?

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 weeks 52 minutes ago by Joffm.

Please Log in to join the conversation.

More
3 weeks 44 minutes ago #274985 by rajkumar_dms
In question D we want to show those option selected in Question C for each sub question ,for Question C ask Those option selected in Question B

Please Log in to join the conversation.

More
2 weeks 6 days ago #274987 by Joffm
Hi,
BA2C and BA2D seem to be identical questions.

So what exactly shall be shown in BA2D?
Show an example!
Just draw a picture with some selected options in BA2C and then show how BA2D is to be displayed.

Joffm
 

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

Please Log in to join the conversation.

More
2 weeks 6 days ago #274992 by rajkumar_dms
In BA2D to be shown those option coded in BA2C

Let supposed for Brand 1 option are selected in BA2C 1,2,14 then in BA2D these 3 option should shown similarly for for rest Brand

Please Log in to join the conversation.

More
2 weeks 6 days ago #274994 by Joffm
Sorry, I do not understand.
You want to show the same options in D, that were selected in C? Why? It is the same question.
I could understand, if it is a different question, like
C: Which type of item do you know from that brand?
D: Which type of item did you ever buy from that brand?

But now, no idea.
Therefore I wrote: Draw a small image.
How should D look like, if the respondent selected this (red stars) in C?


 

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

Please Log in to join the conversation.

More
2 weeks 6 days ago #274997 by rajkumar_dms
Yes you are right those option are selected C should be shown in D and i forgot to change the question text of D

As per image red star mark in question C only these red star mark option are shown in question D

In Question C for Brand "Lozy" I choose Option 3,5,10 then 3,5,10 option are to be shown in question D for "Lozy"
In Question C for Brand "KAMI" I choose Option 2,3,8 then 2,3,8 option are to be shown in question D for "KAMI"

And Like this for other brand as per option selected in question c are to be shown in question D
 

Please Log in to join the conversation.

More
2 weeks 6 days ago - 2 weeks 6 days ago #274999 by Joffm
Hi,
I already showed how to remove the checkboxes in QA2C.
Here as example for row 3 (Lafiye)
Code:
    // Remove in row 3
    $('#question{QID} tr[id^="javatbd"]:eq(2) .checkbox-item:eq(0) *').remove();
    $('#question{QID} tr[id^="javatbd"]:eq(2) .checkbox-item:eq(4) *').remove();
    $('#question{QID} tr[id^="javatbd"]:eq(2) .checkbox-item:eq(5) *').remove();
    $('#question{QID} tr[id^="javatbd"]:eq(2) .checkbox-item:eq(13) *').remove();


In QA2D first you remove the same checkboxes (copy/paste)
Afterwards you remove the checkboxes that are not selected inQA2C.
If the value of the specific cell is not equal 1 -> remove.
Again the example for row 3
Code:
    // Remove in row 3
    if('{BA2C_3_2.NAOK}'!=1) {   $('#question{QID} tr[id^="javatbd"]:eq(2) .checkbox-item:eq(1) *').remove();  }
    if('{BA2C_3_3.NAOK}'!=1) {   $('#question{QID} tr[id^="javatbd"]:eq(2) .checkbox-item:eq(2) *').remove();  }
    if('{BA2C_3_4.NAOK}'!=1) {   $('#question{QID} tr[id^="javatbd"]:eq(2) .checkbox-item:eq(3) *').remove();  }
    if('{BA2C_3_7.NAOK}'!=1) {   $('#question{QID} tr[id^="javatbd"]:eq(2) .checkbox-item:eq(6) *').remove();  }
    if('{BA2C_3_8.NAOK}'!=1) {   $('#question{QID} tr[id^="javatbd"]:eq(2) .checkbox-item:eq(7) *').remove();  }
    if('{BA2C_3_9.NAOK}'!=1) {   $('#question{QID} tr[id^="javatbd"]:eq(2) .checkbox-item:eq(8) *').remove();  }
    if('{BA2C_3_10.NAOK}'!=1) {   $('#question{QID} tr[id^="javatbd"]:eq(2) .checkbox-item:eq(9) *').remove();  }
    if('{BA2C_3_11.NAOK}'!=1) {   $('#question{QID} tr[id^="javatbd"]:eq(2) .checkbox-item:eq(10) *').remove();  }
    if('{BA2C_3_12.NAOK}'!=1) {   $('#question{QID} tr[id^="javatbd"]:eq(2) .checkbox-item:eq(11) *').remove();  }
    if('{BA2C_3_13.NAOK}'!=1) {   $('#question{QID} tr[id^="javatbd"]:eq(2) .checkbox-item:eq(12) *').remove();  }


 
 
 

Beware: Questions have to be in different groups (or displayed "question by question")

And consider the correct array filter setting to display the "other" option.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 2 weeks 6 days ago by Joffm.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose