Welcome, Guest
Username: Password: Remember me

TOPIC: New concept of sub-questions was introduced

New concept of sub-questions was introduced 2 years 9 months ago #74342

  • sammy
  • sammy's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 25
  • Karma: 0
Any information about sub-question in v1.9.2 RC3.

What's suggestion to create below sub-questions / please give sample if any idea/concept?

Q1) How many kids ?
Q2) What's the name of your kid/kids ?
Appear number of short-text base on input value of Q1
Q3) How old your kid/kids ?
Appear the kid name and select 'age' in pup-down list.
The administrator has disabled public write access.

Aw: New concept of sub-questions was introduced 2 years 9 months ago #74369

  • Steve
  • Steve's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 494
  • Thank you received: 46
  • Karma: 17
Hello,

there was a discussion about one/two weeks ago at www.limesurvey.org/de/forum/can-i-do-thi...uestions-sub-surveys . TMSWhite offerd a solution using conditions/relevance equations and copying/modifying groups in order to solve this problem. It might not be the best possible solution but it is possible in the LimeSurvey 1.92 RCs.

Think about it this way. You add question to a survey, then start the survey. Now a table in the database for the responses will be created (you use this table for the responses/statistics feature). You have a fixed number of columns for your questions, e.g. Kid1name, Kid1age, ... . If you want to dynamically add new childs (in the database new colums) you might run into problems. It is not that simple to dynamically add things and use them in the responses view/statistics. It might take much effort to develop this (and perhaps you even have to think about new solutions in the database).
Mit freundlichen Grüßen/Best regards,

Stefan Gohlke
LimeSurvey Team
The administrator has disabled public write access.

Re: New concept of sub-questions was introduced 2 years 9 months ago #74374

  • holch
  • holch's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 2958
  • Thank you received: 381
  • Karma: 124
They way you describe this, it would need quite some custom coding I guess.

What about the following: You create question number 1. The number of kids should not be infinite, so I guess it is save to say that if you give them space for 5 and call the last one "5 or more" you should be save in most cases. Or if you want to be on the save side, make it "10 or more".

Then you create a question group with the question about the name and the age of the first kid. You copy this group as many times as you have given them possibilities to mark kids (5 or 10 times or whatever).

Then you create a condition to hide the questions according to the number of kids they have marked in the first question. The last one (5 or 10 for example) you could make a open text question and ask them to fill in the information for any further kid.

Maybe someone can come up with a solution based on your example and hiding input fields, but I am not good at Javascript.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.

Aw: New concept of sub-questions was introduced 2 years 9 months ago #74388

  • Steve
  • Steve's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 494
  • Thank you received: 46
  • Karma: 17
Hello,

you can create a fixed size of question for kid1 to kidx but I don't think you really can sumarize name and age for children saying "5 or more". What would you then enter, "AndreaJohnMike" and "11" (10 + 11 + 12 / 3). That doesn't make any sense. Okay, if you use an open text field that is possible but you cannot use it for the statistics.

We discussed about subquestion relevance in another thread but at the moment it is only available when using array filter and array filter exclude. If this option is available we might use another solution, for example we create one Multiple Short Text question for the name and one Multiple Numerical Question for the age. We then use an expression for the subquestion relevance settings for each subquestion/answer, for the first child e.g.
if(!is_empty(numKids), if(numKids.NAOK > 1, '1', '0') ,'0' )
. That might not be the best sollution but for entities with only a text and a value it might make the survey shorter (meaning you just use two questions instead of creating a numeric input and short text for each kid).
But we have to wait and see if and when subquestion relevance is possible.
Mit freundlichen Grüßen/Best regards,

Stefan Gohlke
LimeSurvey Team
The administrator has disabled public write access.

Aw: New concept of sub-questions was introduced 2 years 9 months ago #74397

  • holch
  • holch's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 2958
  • Thank you received: 381
  • Karma: 124
Come on! It should not be difficult to write the last few kids in as

Steven, 12
Marc, 23
Andrea, 11

I mean, this would mean some coding at the end, but if you put like 10 fixed question groups the chance that someone will reach the 10+ should be really minimal. And if so, some hand coding will not kill you.

If you ask people to insert the rest of the kids with their respective age, they should be able to do this. Of course it would be ideal if we'd have a loop function, but in general, we should be pragmatic in this case.

Yes, you can't use the final sum up question in statistics. But hey, what is the chance to have someone in your sample anyway?

And if you wouldn't want to risk anything, copy the question 20 times... ;-)
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
Last Edit: 2 years 9 months ago by holch.
The administrator has disabled public write access.

Re: Aw: New concept of sub-questions was introduced 2 years 9 months ago #74459

  • sammy
  • sammy's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 25
  • Karma: 0
Thanks all,
It seems the solution to define the maxmium of sub-question (like as the maximum number of fields for kids name/age in the survey response table).
and then, setup the subquestion relevance settings which on default is hidden and according to the 1st question (How many kids ?) to show the subquestion.

Is my understanding from your hints/proposal without coding, right ?
The administrator has disabled public write access.

Aw: New concept of sub-questions was introduced 2 years 9 months ago #74485

  • Steve
  • Steve's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 494
  • Thank you received: 46
  • Karma: 17
Hello,

@holch:
If you don't want to use it for statistics you can also use one Huge Text Field to let the participant write down anything they like about their kids. It might not be that important for the "name and age of kidx" example but there might be other examples (e.g. a product survey where you can have more than one of the same product or a course selection/participant survey where more than one or two questions are used for each person). We have and had questions like this in the forum so it might be a good idea to think about a solution to make surveys more dynamic.

@sammy:
Yes, but if I'm correct the subquestion relevance setting is not available at the moment (or let's say the array filter and array filter exclude are converted to subquestion relevance but we don't have a field for adding subquestion relevance to a specific subquestion). If we ask TMSWhite about it he might tells us how far he has come/the status of the subquestion relevance settings and when he thinks it will be available.
Mit freundlichen Grüßen/Best regards,

Stefan Gohlke
LimeSurvey Team
The administrator has disabled public write access.

Re: Aw: New concept of sub-questions was introduced 2 years 9 months ago #74501

  • holch
  • holch's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 2958
  • Thank you received: 381
  • Karma: 124
@Vierundzwanzig: I totally understand your point. But I was going at it with some pragmatism. And The chance that someone wants to include more than 10 kids should be minimal. If there are 1 or 2 in your sample, I guess it is not that big of a problem. To suggest to use a huge text field at the and was for the case there is really someone who has more than 10 kids (I guess he/she won't have time to respond surveys anyway... ;-) ).

Of course, ideally we would be able to loop this through until there is no need anymore. But when you are not very good at programming and javascript, then you need to do things with what LS offers already and there the solution with a fixed number above the expected maximum of kids was supposed to make life easier for Sammy, in case he/she doesn't need to be 100% accurat, but can live with 99,9% in case there is someone in the sample who passes n=10 kids for example.

And it is definitely a good idea to think about a looping feature. I am totally in favor of this. But until then, I guess we have to show some pragmatic and some more sophisticated and complicated solutions.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.

Re: Aw: New concept of sub-questions was introduced 2 years 9 months ago #74689

  • sammy
  • sammy's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 25
  • Karma: 0
Sure, and that's great if have some looping feature in the future release. Boz, some question/sub-question require to capture answer.

Of course, the temp work-around solution to create max set mutli-short text in sub-question (Eg. 10 sets) to ask it.
But it is not beautiful look and feel in one web page.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.123 seconds
Donation Image