Welcome to the LimeSurvey Community Forum

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

Nested/sub-question

  • ymca
  • ymca's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 10 months ago #198888 by ymca
Nested/sub-question was created by ymca
Hi,

I'm trying to make a question with answer and sub-answer.
Like in this example: bugs.limesurvey.org/file_download.php?file_id=13146&type=bug (I don't know why I cannot see this in the preview window here)

I was searching how to do that and saw here that the option is not yet ready?

Note that currently it is not possible to output the question text of questions with subquestions, see this feature request .

So how do I make the list of religions appear under that answer if the user chooses "a"?

1. What is your belief system?
a. Religion
- Christianity
- Islam
- ...
b. Atheism
c. Agnosticism
d. Secularism
e. Lack of religion

(LS 4.2.1)

LS Version 4.2+
The topic has been locked.
  • holch
  • holch's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #198889 by holch
Replied by holch on topic Nested/sub-question

(I don't know why I cannot see this in the preview window here


Because it is a link to an image and not an image.

You will have to search for it, but there are javascript solutions floating around.

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
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #198890 by tpartner
Replied by tpartner on topic Nested/sub-question
There is a workaround here (may need to be adapted for 4.x) - manual.limesurvey.org/Workarounds:_Manip..._options.22_question

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: DenisChenu
The topic has been locked.
  • ymca
  • ymca's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 10 months ago - 3 years 10 months ago #198893 by ymca
Replied by ymca on topic Nested/sub-question

tpartner wrote: There is a workaround here (may need to be adapted for 4.x) - manual.limesurvey.org/Workarounds:_Manip..._options.22_question

Thanks.
But if I prefer not to touch the code, is there another way of doing things?
Code:
1. What is your belief system?
a. Religion
b. Atheism
c. Agnosticism
d. Secularism
e. Lack of religion
I was thinking of making a condition.
If the user choose "Religion" it will show the "Religion" list,
but if he choose also "Lack of religion" it will not show the "Religion" list.

Or there is a better way of doing this thing?

LS Version 4.2+
Last edit: 3 years 10 months ago by ymca.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #198894 by Joffm
Replied by Joffm on topic Nested/sub-question

Or there is a better way of doing this thing?

At the moment, no.
This fulfills your wish of "nested" subquestions.

But if I prefer not to touch the code

It's just a javascript snippet in the question text. So, what?

I was thinking of making a condition.

It is possible using subquestion relevance.
But it doesn't validate. That's up to you.



Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • ymca
  • ymca's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 10 months ago - 3 years 10 months ago #198896 by ymca
Replied by ymca on topic Nested/sub-question

Joffm wrote:

But it doesn't validate

What "validate" means?
I can show statistics to users but not calculate them in a statistic program like sofastatistics ?


LS Version 4.2+
Last edit: 3 years 10 months ago by ymca.
The topic has been locked.
  • ymca
  • ymca's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 10 months ago - 3 years 10 months ago #198898 by ymca
Replied by ymca on topic Nested/sub-question
Joffm, you mean this?
I think I understand.
It's for default options like email, phone number and such,
so the system will know the information inserted is correct or in the right format.
manual.limesurvey.org/QS:Em_validation_q/en

LS Version 4.2+
Last edit: 3 years 10 months ago by ymca.
The topic has been locked.
  • ymca
  • ymca's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 10 months ago #198899 by ymca
Replied by ymca on topic Nested/sub-question
Didn't mean like that:

Was thinking of moving the religion to a new question.

LS Version 4.2+
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #198901 by Joffm
Replied by Joffm on topic Nested/sub-question

I was searching how to do that and saw here that the option is not yet ready?

Note that currently it is not possible to output the question text of questions with subquestions

Here you refer to something quite different.
This is about the display of the "text" of a question in a later question.
manual.limesurvey.org/ExpressionScript_-...#Access_to_variables
Qcode.question the text of the question {gender.question} 'What is your gender?'

But back to your original question.
As this question is a single punch question, you should use a question of type "single".
The mentioned workarounds use multiple questions.

But in my - and the internet's - opinion there are only very few - your - options of being "not religious".

As I see in your example you do not want to display each "evangelical sect" but stay to the major ones.
So there are only four: Christianity, Islam, Hinduism and Buddhism
Even if you split into different subcategories like "protestant", "roman catholic", "Sunna", "Schia", ..., "Vishnuism", Shivaism",..., "Hinayana", "Mahayana",...

And even if you add the medium sized ones
Taoism
Shinto
Falun Gong
Sikhism
Judaism
Confucianism
Bahá'í Faith

Meaning, in total you won't ge too many, +-20

So it is absolute sufficient to use one single question.
And you may display the different religions in different colors, with an added icon.

The simple solution is - of course - to split the question.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • ymca
  • ymca's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 10 months ago - 3 years 10 months ago #198910 by ymca
Replied by ymca on topic Nested/sub-question

The simple solution is - of course - to split the question.

Yes I prefer the more simple the better.
It bothers me for a week because I had a talk with a friend.
He is Jewish, and he is Secular but also he is close to Judaism in some degree.

So if I do radio button he will only be able to choose Secular or religion>religion list.
And if I use check box, a user that is religions/Lack of religion, will be able to choose both.
:pinch:

LS Version 4.2+
Last edit: 3 years 10 months ago by ymca.
The topic has been locked.
  • ymca
  • ymca's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 10 months ago #198922 by ymca
Replied by ymca on topic Nested/sub-question
I think I've done it.:woohoo:

LS Version 4.2+
Attachments:
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #198950 by Joffm
Replied by Joffm on topic Nested/sub-question
In my opinion you still ask for apples and pears in your first question.

1. Someone could be "agnostic", support the ideas od secularism or laizism (separation of religion and state as in France or Turkey) and be a "neo-fascist".
No problem, but what to select?

2. The first three items you may see as "religion related", but the fourth?
Obviously this is a different dimension -> a different question
To avoid the impression of being biased there should be the whole political spectrum from far left to far right (liberalism, communism, conservatism, anarchism,...)

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose