- Posts: 3
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
First ask for e-mail then show a second question depending on the e-mail ending
- yanvro
- Topic Author
- Offline
- New Member
Less
More
6 months 4 days ago #251394
by yanvro
First ask for e-mail then show a second question depending on the e-mail ending was created by yanvro
Hi, here is a description of what I'd like to do using LimeSurvey :
Best,
Yannick
- First, ask for the respondent's e-mail address (so far, so good)
- Then show a second question only if the e-mail address ends with a specific chain of characters (e.g. only if the e-mail address ends with "@gmail.com")
Best,
Yannick
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12941
- Thank you received: 3979
6 months 4 days ago #251395
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic First ask for e-mail then show a second question depending on the e-mail ending
Hi, so far, so bad.
Why didn't you answer the questions at the beginning?
Well,
use a question of type equation ("eq1") and use some string functions
[url] manual.limesurvey.org/ExpressionScript_-...mplemented_functions [/url]
to get the domain as substring.
Then you can use this as condition for the nextz question
eq1=='gmail.com'
Joffm
Why didn't you answer the questions at the beginning?
Well,
use a question of type equation ("eq1") and use some string functions
[url] manual.limesurvey.org/ExpressionScript_-...mplemented_functions [/url]
to get the domain as substring.
Then you can use this as condition for the nextz question
eq1=='gmail.com'
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: yanvro
Please Log in to join the conversation.
- yanvro
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
6 months 4 days ago #251396
by yanvro
Replied by yanvro on topic First ask for e-mail then show a second question depending on the e-mail ending
Thank you Joffm, it took me some time to figure out how to do it but I finally managed to make it work ! Sorry I did not answer the questions, I am not very familiar with this forum as this is my very first post, I sure will next time !
Thanks again,
Best,
Yannick
Thanks again,
Best,
Yannick
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12941
- Thank you received: 3979
6 months 4 days ago #251397
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic First ask for e-mail then show a second question depending on the e-mail ending
Hi,
We give a hint to make you find out by yourself and become more familiar with the system.
BTW: Did you also get
{substr(Q1,strpos(Q1,'@')+1)}
Joffm
That's how it should work.I finally managed to make it work
We give a hint to make you find out by yourself and become more familiar with the system.
BTW: Did you also get
{substr(Q1,strpos(Q1,'@')+1)}
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.
- yanvro
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
5 months 4 weeks ago #251597
by yanvro
Replied by yanvro on topic First ask for e-mail then show a second question depending on the e-mail ending
Hi Joffm,
At first, I had used the function {substr(email,-13)} to get the last 13 characters of the e-mail and then use it as a source for comparison for conditionnal access to some questions. But then I switched to what you have suggested above, thanks !
Best,
Yannick
At first, I had used the function {substr(email,-13)} to get the last 13 characters of the e-mail and then use it as a source for comparison for conditionnal access to some questions. But then I switched to what you have suggested above, thanks !
Best,
Yannick
Please Log in to join the conversation.