Can I create custom arrays?

3 years 3 days ago #106528 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.

Please Log in to join the conversation.

3 years 3 days ago #106530 by holch
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.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

3 years 2 days ago #106534 by christianC
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.

Please Log in to join the conversation.

3 years 2 days ago #106551 by tpartner
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 -


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

Please Log in to join the conversation.