- Posts: 31
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
How can i set a value for a list(radio) question based on answer to previous que
- douerliang
- Topic Author
- Offline
- Junior Member
Less
More
7 years 11 months ago #135051
by douerliang
How can i set a value for a list(radio) question based on answer to previous que was created by douerliang
Hello everyone!
I'm back again with a complex problem. hahahaha....
Such as the title,I want to set a value for a list(radio) question based on answer to previous question, but I don't know how to do it.
I searched a number of posts.
For example:
Using assignment operator to set a default value for a list type question
Set the answer for one question based on answer to previous question
This solution is realized through javascript.
But I want do it use EM.
Can someone help me?
I'm sorry for my english!
I'm back again with a complex problem. hahahaha....
Such as the title,I want to set a value for a list(radio) question based on answer to previous question, but I don't know how to do it.
I searched a number of posts.
For example:
Using assignment operator to set a default value for a list type question
Set the answer for one question based on answer to previous question
This solution is realized through javascript.
But I want do it use EM.
Can someone help me?
I'm sorry for my english!
The topic has been locked.
- tpartner
- Away
- LimeSurvey Community Team
Less
More
- Posts: 10631
- Thank you received: 3696
7 years 11 months ago #135071
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic How can i set a value for a list(radio) question based on answer to previous que
You can use
the assignment operator
in an equation question placed after the question to be manipulated. In this example Q2 will be set to "A1" if Q1 is "A1", otherwise Q2 will be set to "A2".
Sample survey attached:
Code:
{Q2=if(Q1=="A1","A1","A2")}
Sample survey attached:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The following user(s) said Thank You: douerliang
The topic has been locked.
- douerliang
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 1
7 years 11 months ago #135101
by douerliang
Replied by douerliang on topic How can i set a value for a list(radio) question based on answer to previous que
hi, tpartner,thank you for your replay.
the solutions you provided is good.
But I still want to know How can i set a value for a list(radio) question based on answer to previous question?
The question type is List(Radio) instead of equation question.
Please forgive me into a dead end!(stubborn)
I'm sorry for my english!
Certainly must learn English!
the solutions you provided is good.
But I still want to know How can i set a value for a list(radio) question based on answer to previous question?
The question type is List(Radio) instead of equation question.
Please forgive me into a dead end!(stubborn)
I'm sorry for my english!
Certainly must learn English!
The topic has been locked.
- tpartner
- Away
- LimeSurvey Community Team
Less
More
- Posts: 10631
- Thank you received: 3696
7 years 11 months ago #135106
by tpartner
The equation question is used to set the radio question.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic How can i set a value for a list(radio) question based on answer to previous que
That's exactly what my sample survey does. Did you try it???But I still want to know How can i set a value for a list(radio) question based on answer to previous question?
The equation question is used to set the radio question.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- douerliang
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 1
7 years 11 months ago #135137
by douerliang
Replied by douerliang on topic How can i set a value for a list(radio) question based on answer to previous que
tpartner,thank you for reminding.
The sample survey you provided is a perfect solution to the problem.
I'm sorry for my not serious.
Once again, thank you.
The sample survey you provided is a perfect solution to the problem.
I'm sorry for my not serious.
Once again, thank you.
The topic has been locked.