Welcome to the LimeSurvey Community Forum

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

Can I create custom arrays?

  • christianC
  • christianC's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 11 months ago #106528 by christianC
Can I create custom arrays? was created by christianC
hello everybody,

For a university project study I need to make an array that looks like:

Do you:
smoke? No Yes [Number]per day
Drink No Yes [Number] per day

and so on....
is a single answer per row with an added number input.


Thank you for your time.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 11 months ago #106530 by holch
Replied by holch on topic Can I create custom arrays?
That is a normal array question. You can choose your scale (in this case "Yes / No". I think there is even a "Yes / No" scale already built in, but it includes "yes / no / uncertain".

But just choose the normal array question and you are totally free to create your own array header.

manual.limesurvey.org/Question_types#Array

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.
  • christianC
  • christianC's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 11 months ago #106534 by christianC
Replied by christianC on topic Can I create custom arrays?
Thank you for your answer. Yes it is a yes/no question but the third field should be a text field or number field. Maybe I did not explained clearly enough. I know that I can choose array I define the header and the rows but my question is if I can customize the row content to have mixed content

to be like:

Question text

Answer1 [radio button]No [radio button]Yes [number input]some text
Answer2 [radio button]No [radio button]Yes [number input]some text


the two radio buttons to be like a single answer per row and the number input mandatory if yes selected.

I presume I need some javascript for this. I have seen the topic with grouping of items but is not very doable when you have a list of 50 questions in an array to make this kind of question grouping. That's why I as if is a way to make my own custom array with NO/Yes and a input text.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 11 months ago #106551 by tpartner
Replied by tpartner on topic Can I create custom arrays?
You will need to add a multiple-short-text question after the array and use JavaScript to move the text inputs into the array.

Here is a similar solution - www.limesurvey.org/en/forum/design-issue...to-text-input#102550


.

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: christianC
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose