- Posts: 9
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Dual Scale Array to Multiple Scale Array Possibility?
- Newbeedu
- Topic Author
- Offline
- New Member
Less
More
12 years 1 month ago #76872
by Newbeedu
Replied by Newbeedu on topic Dual Scale Array to Multiple Scale Array Possibility?
Hi,
If I put the question code as suggested in the link, it is hiding all the 10 parameters.
I even tried with a new page, still it hides it all.
If I put the question code as suggested in the link, it is hiding all the 10 parameters.
I even tried with a new page, still it hides it all.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
12 years 1 month ago #76878
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 Dual Scale Array to Multiple Scale Array Possibility?
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.
- Newbeedu
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
12 years 1 month ago #76881
by Newbeedu
Replied by Newbeedu on topic Dual Scale Array to Multiple Scale Array Possibility?
Sorry Tony its still not working.
it is displaying either all the options if I put the code in Array filter or none of the options if the put the question code in Array filter exclusion.
it is displaying either all the options if I put the code in Array filter or none of the options if the put the question code in Array filter exclusion.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
12 years 1 month ago - 12 years 1 month ago #76888
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 Dual Scale Array to Multiple Scale Array Possibility?
You need to use the question code, not the question ID:
Try this survey:
Try this survey:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
Last edit: 12 years 1 month ago by tpartner.
The following user(s) said Thank You: Newbeedu
The topic has been locked.
- Newbeedu
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
12 years 1 month ago #76949
by Newbeedu
Replied by Newbeedu on topic Dual Scale Array to Multiple Scale Array Possibility?
Hi Again,
I am having 2 different matrix on a single page, as in 10 items rated on 3 parameters in one and 10 items rated on 4 other parameters again.
If i put these two question in a same question group, then everything is coming together.
Would it be possible to have it is 2 separate questions?
I am having 2 different matrix on a single page, as in 10 items rated on 3 parameters in one and 10 items rated on 4 other parameters again.
If i put these two question in a same question group, then everything is coming together.
Would it be possible to have it is 2 separate questions?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
12 years 1 month ago #76950
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 Dual Scale Array to Multiple Scale Array Possibility?
Hmm...that's a little trickier. Can you attach a sample 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.
- Newbeedu
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
12 years 1 month ago #76955
by Newbeedu
Replied by Newbeedu on topic Dual Scale Array to Multiple Scale Array Possibility?
I have attached a sample survey.
In page 2 all 7 parameters are listed in one line, where in i want the last 4 to be listed below the second question (like in page 3).
Pls Help.
In page 2 all 7 parameters are listed in one line, where in i want the last 4 to be listed below the second question (like in page 3).
Pls Help.
Attachments:
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
12 years 1 month ago #76966
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 Dual Scale Array to Multiple Scale Array Possibility?
A note before we go any farther: You must not use the "Random answer order" setting for these array questions.
I wrapped everything in a function that you need to call with the start and end question numbers. So, in the case of your sample survey where you want questions 2-4 inline and then questions 6-9 inline, you would call the function twice:
The complete code for your survey:
And the survey with the code in the source of the first array:
I wrapped everything in a function that you need to call with the start and end question numbers. So, in the case of your sample survey where you want questions 2-4 inline and then questions 6-9 inline, you would call the function twice:
Code:
sideBySide(2, 4); sideBySide(6, 9);
The complete code for your survey:
Code:
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { sideBySide(2, 4); sideBySide(6, 9); function sideBySide(start, end) { // Add some temporary classes to the target questions $('div[id^="question"]').each(function(i){ var qNum = i + 1; var el = $(this); if (qNum >= start && qNum <= end) { $(el).addClass('targetQ'); } }); // Wrap the questions in a div $('.targetQ').wrapAll('<div class="targetWrapper" />'); $('.targetWrapper').after('<div style="clear:both" />'); // Add some classes to the questions in the target wrapper $('.targetWrapper .targetQ').addClass('inlineQuestion inlineQuestionSub'); $('.targetWrapper .inlineQuestionSub:first').removeClass('inlineQuestionSub').addClass('inlineQuestionPrime'); // Remove the text from the secondary questions $('.targetWrapper .inlineQuestionSub th.answertext').text(''); // Apply some styles (these are for the default template) $('.targetWrapper .inlineQuestion').css({ 'float': 'left' }); $('.targetWrapper .inlineQuestion col, .targetWrapper .inlineQuestion th.answertext').css({ 'width': 'auto' }); $('.targetWrapper .inlineQuestion .question-wrapper').css({ 'width': '100%' }); $('.targetWrapper .inlineQuestion td.answer').css({ 'padding': '0.5em 0' }); $('.targetWrapper .inlineQuestion td.questiontext').css({ 'text-align': 'center' }); // Center the wrapper div var wrapperWidth = 0; $('.targetWrapper .inlineQuestion').each(function(i){ wrapperWidth = wrapperWidth + $(this).width(); var padLeft = $('.answertext:eq(0)', this).width() + 3; $('.questiontext', this).css({ 'padding-left':padLeft+'px', 'padding-right':'3px' }); }); $('.targetWrapper').css({ 'width':wrapperWidth+'px', 'margin': '0 auto' }); // Set the row heights var wrapperWidth = 0; $('.targetWrapper .inlineQuestionSub').each(function(i){ $('tbody[id^="javatbd"]', this).each(function(i){ var ansHeight = $('.targetWrapper .inlineQuestionPrime th.answertext:eq('+i+')').innerHeight(); if($.browser.mozilla) { $('th.answertext', this).height(ansHeight-1); } else { $('th.answertext', this).innerHeight(ansHeight); } }); }); // Remove the temporary classes $('.targetQ').removeClass('targetQ'); $('.targetWrapper').removeClass('targetWrapper'); } }); </script>
And the survey with the code in the source of the first array:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The following user(s) said Thank You: Newbeedu
The topic has been locked.
- DianaS7
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 0
12 years 3 weeks ago #78054
by DianaS7
Replied by DianaS7 on topic Dual Scale Array to Multiple Scale Array Possibility?
Hi Tony,
My name is Diana, I Want to do an array with 3 different scales. I saw your posts and I tried to reproduce it on my computer. But I can´t do it.
I created 3 different arrays with the same number of rows.I edited one of the question and clicked the "Source" button and then I copied the script that you posted e saved the page. But nothing happened.
I don´t know if I can just copy the script or if I have to do something else.
I hope you can help me.
On the image attached you can see what I need to do.
Thanks
My name is Diana, I Want to do an array with 3 different scales. I saw your posts and I tried to reproduce it on my computer. But I can´t do it.
I created 3 different arrays with the same number of rows.I edited one of the question and clicked the "Source" button and then I copied the script that you posted e saved the page. But nothing happened.
I don´t know if I can just copy the script or if I have to do something else.
I hope you can help me.
On the image attached you can see what I need to do.
Thanks
Attachments:
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
12 years 3 weeks ago #78057
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 Dual Scale Array to Multiple Scale Array Possibility?
Hi Diana,
Did you disable the XSS filter?
Can you activate a sample survey for me to see?
Did you disable the XSS filter?
Can you activate a sample survey for me to see?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- DianaS7
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 0
12 years 3 weeks ago #78103
by DianaS7
Replied by DianaS7 on topic Dual Scale Array to Multiple Scale Array Possibility?
Hi Tony,
Thanks for the response. I disable the XSS filter but it´s still not working. I´ve activated an example. As you can see in here:
dianas.limequery.com/index.php?sid=57517...oken=yscfhdxdyd7cy85
In the attachment, you can see what I want to do with the 3 tables that i've put on the survey.
Thanks for the help.
Diana
Thanks for the response. I disable the XSS filter but it´s still not working. I´ve activated an example. As you can see in here:
dianas.limequery.com/index.php?sid=57517...oken=yscfhdxdyd7cy85
In the attachment, you can see what I want to do with the 3 tables that i've put on the survey.
Thanks for the help.
Diana
Attachments:
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
12 years 3 weeks ago #78105
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 Dual Scale Array to Multiple Scale Array Possibility?
I don't see the JavaScript in the sample survey. Did you add it?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.