- Posts: 28
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Multiple question types in array
- Stan
- Topic Author
- Offline
- Junior Member
Less
More
8 years 4 months ago #129343
by Stan
Multiple question types in array was created by Stan
Hi all,
i would like to let some questions appearing in an array. The workaround in the Manual is very good but the Javascript-code doesn't set it up in the way i want it. Then the code is taking in all the next following questions in the change, while i just want to put only 2 or 3 questions in the same array. Is there a way to modify the code, so that it would take only a specific number of questions and not influence the following ones? Thanks.
Using LS Version 2.06+ Build 151018
i would like to let some questions appearing in an array. The workaround in the Manual is very good but the Javascript-code doesn't set it up in the way i want it. Then the code is taking in all the next following questions in the change, while i just want to put only 2 or 3 questions in the same array. Is there a way to modify the code, so that it would take only a specific number of questions and not influence the following ones? Thanks.
Using LS Version 2.06+ Build 151018
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
8 years 4 months ago #129345
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 Multiple question types in array
From what I read in the explanation of the workaround you can adapt the columns and lines so that it takes only certain questions on the page.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The following user(s) said Thank You: Stan
The topic has been locked.
- Stan
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 28
- Thank you received: 0
8 years 4 months ago - 8 years 4 months ago #129356
by Stan
Replied by Stan on topic Multiple question types in array
Thanks holch for reply.
I tried to manipulate the code without success (despite of a quick Java Tutorial). I certainly need a hint on this.
Here is a LINK to the survey i'm working on.
For example, i just want the two first questions to be displayed in an array. And the following others normally.
I tried to manipulate the code without success (despite of a quick Java Tutorial). I certainly need a hint on this.
Here is a LINK to the survey i'm working on.
For example, i just want the two first questions to be displayed in an array. And the following others normally.
Last edit: 8 years 4 months ago by Stan. Reason: Complete information
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
8 years 4 months ago #129362
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 Multiple question types in array
Off-topic: Seeing your example, I am not even sure why you want these two questions in an array. They don't really have anything to do one with the other (e.g. the same subquestion per line). These are actually two separate questions and I personally would treat and display them as such.
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.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
8 years 4 months ago #129374
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 question types in array
It seems to me that you have called the sideBySide() function with 4 rows and 4 columns, so it will attempt to manipulate 16 questions.
If you only want 2 questions in a single row, this:
Should be something like this:
Having said that, if only a couple of questions are to be manipulated, you may be better off just aligning them side-by-side with CSS.
If you only want 2 questions in a single row, this:
Code:
sideBySide(4, 4, 1);
Should be something like this:
Code:
sideBySide(1, 2, 1);
Having said that, if only a couple of questions are to be manipulated, you may be better off just aligning them side-by-side with CSS.
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: Stan
The topic has been locked.
- Stan
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 28
- Thank you received: 0
8 years 4 months ago #129389
by Stan
Replied by Stan on topic Multiple question types in array
Hi holch,
don't worry I just wanted to show how the code is displaying the questions (without paying attention to the logic).
don't worry I just wanted to show how the code is displaying the questions (without paying attention to the logic).
The topic has been locked.
- Stan
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 28
- Thank you received: 0
8 years 4 months ago #129390
by Stan
Replied by Stan on topic Multiple question types in array
Attachments:
The topic has been locked.
- Stan
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 28
- Thank you received: 0
8 years 4 months ago - 8 years 4 months ago #129391
by Stan
Replied by Stan on topic Multiple question types in array
I do have another question.
The next following question is looking like this - And i want questions 1 and 2 to look like above in an array.
So i simply inserted the whole code in the question "1" (it's actually the 7th question in my survey:
and the result is this:
The questions "1" and "2" are joining the array above. While i want them to stay at their place. In other words, i would like to have the array above two times (or more when necessary) in the survey at different places. Because these questions will be asked very often.
How can we make that happen?
The next following question is looking like this - And i want questions 1 and 2 to look like above in an array.
So i simply inserted the whole code in the question "1" (it's actually the 7th question in my survey:
Code:
sideBySide(1, 2, 7);
The questions "1" and "2" are joining the array above. While i want them to stay at their place. In other words, i would like to have the array above two times (or more when necessary) in the survey at different places. Because these questions will be asked very often.
How can we make that happen?
Last edit: 8 years 4 months ago by Stan.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
8 years 4 months ago - 8 years 4 months ago #129410
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 question types in array
That workaround was not intended to be used more than once on a page and, if all you want to do is align various sets of two questions side-by-side, I think it may be overkill anyway.
Can you attach a small sample survey containing only that group?
Can you attach a small sample survey containing only that group?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 8 years 4 months ago by tpartner.
The following user(s) said Thank You: Stan
The topic has been locked.
- Stan
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 28
- Thank you received: 0
8 years 4 months ago #129461
by Stan
Replied by Stan on topic Multiple question types in array
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
8 years 4 months ago #129464
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 Multiple question types in array
To help you Tpartner will probalby need that you export a sample survey (containing only the part in question). He can't work on your survey, and it is a bit much to ask of him to rebuild the survey to help you.
Help him/us to help you.
Help him/us to help you.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The following user(s) said Thank You: tpartner
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
8 years 3 months ago #129516
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 question types in array
Yes, please attach an EXPORT of a small sample survey containing only that group, not a link to an existing 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.