Display different number of textfields depending on another value

More
2 years 11 months ago #115612 by srank
srank created the topic: Display different number of textfields depending on another value
Hello,

I want to do the following:

In the first textfield the user should be able to enter the number of children he has.

Depending on that value, I want to show a different number of textfields where he can enter the names of his children.

For example, if he has 5 children, there should be 5 textfields for the names.

Is something like this possible with LimeSurvey?

Thank you.

Please Log in to join the conversation.

More
2 years 11 months ago #115616 by holch
holch replied the topic: Display different number of textfields depending on another value
This is possible.

First of all, I would not use a textfield for the first question, but a dropdown or radio button list with the number of children. I guess there won't be more than X children. This depends a little on your target audience, but in most countries the chance to get a respondend with more than 10 children should be small.

So I would go like 0,1,2,..., 10 or more.

Then you create 10 different text input question and use conditions or relevance equations to show each question. For example you would show text question 1 in case that he answers "1" in the first question. You would show TQ2 and TQ1 in case he/she answers "2", etc.

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.

More
2 years 11 months ago #115617 by srank
srank replied the topic: Display different number of textfields depending on another value
Thank you, I also thought about doing something like this. I thought there could be a simpler, cleaner solution.

Please Log in to join the conversation.

More
2 years 11 months ago #115618 by holch
holch replied the topic: Display different number of textfields depending on another value
Unfortunately there is no "looping" in Limesurvey. So you will need to do it this way. In your case it is not very problematic, because the max. number of children can be estimated quite well.

Can get worse if someone can have 50-100 employees and needs to fill in something like that...

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.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!