Welcome to the LimeSurvey Community Forum

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

Multiple question types in array

  • Stan
  • Stan's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 3 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
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 3 months ago #129345 by holch
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
  • Stan's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 3 months ago - 8 years 3 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.
Last edit: 8 years 3 months ago by Stan. Reason: Complete information
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 3 months ago #129362 by holch
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
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 3 months ago #129374 by tpartner
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:
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
  • Stan's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 3 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).
The topic has been locked.
  • Stan
  • Stan's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 3 months ago #129390 by Stan
Replied by Stan on topic Multiple question types in array
Thank you tpartner,

i applied everything as you recommended and it works. Here a snapshot.
Attachments:
The topic has been locked.
  • Stan
  • Stan's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 3 months ago - 8 years 3 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:
Code:
sideBySide(1, 2, 7);
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?
Last edit: 8 years 3 months ago by Stan.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 3 months ago - 8 years 3 months ago #129410 by tpartner
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?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 8 years 3 months ago by tpartner.
The following user(s) said Thank You: Stan
The topic has been locked.
  • Stan
  • Stan's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 3 months ago #129461 by Stan
Replied by Stan on topic Multiple question types in array
Thanks tpartner,

HERE is a sample survey containing only the group but without the workaround.
HERE the same sample with the workaround like before.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 3 months ago #129464 by holch
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.

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
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 3 months ago #129516 by tpartner
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.

Lime-years ahead

Online-surveys for every purse and purpose