- Posts: 6
- Thank you received: 0
- Forum
- English support forums
- Can I do this with LimeSurvey?
- Make question (input text) mandatory based on previous answer
Make question (input text) mandatory based on previous answer
- EdenResident
-
Topic Author
- Offline
- New Member
-
Less
More
2 years 2 months ago #178715
by EdenResident
Hello, my situation is like this.
Q1. I would like to be notified via
Then later
Q5. Please enter your email address: [text box]
I want to make Q5 mandatory if the answer to Q1 is Email. I'm already aware of Relevance and it doesn't work here because I still want to collect the email address even if Q1's answer is SMS. Therefore, branching won't work.
Another option I considered is to have 2 email fields (one for SMS - not mandatory, one for Email-mandatory). This works but is too much of a hack and I would only use it as the last resort.
Beside those 2 methods above, is there a cleaner way to accomplish what I need?
Thanks in advance.
Q1. I would like to be notified via
- SMS
Then later
Q5. Please enter your email address: [text box]
I want to make Q5 mandatory if the answer to Q1 is Email. I'm already aware of Relevance and it doesn't work here because I still want to collect the email address even if Q1's answer is SMS. Therefore, branching won't work.
Another option I considered is to have 2 email fields (one for SMS - not mandatory, one for Email-mandatory). This works but is too much of a hack and I would only use it as the last resort.
Beside those 2 methods above, is there a cleaner way to accomplish what I need?
Thanks in advance.
The topic has been locked.
- DenisChenu
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 14226
- Thank you received: 2514
2 years 2 months ago #178718
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.
Replied by DenisChenu on topic Make question (input text) mandatory based on previous answer
manual.limesurvey.org/Question_type_-_Sh...28em_validation_q.29
Q1.NAOK != "email" or !is_empty(self.NAOK)
Q1.NAOK != "email" or !is_empty(self.NAOK)
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.
The following user(s) said Thank You: EdenResident
The topic has been locked.
- EdenResident
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 6
- Thank you received: 0
2 years 2 months ago #178719
by EdenResident
Replied by EdenResident on topic Make question (input text) mandatory based on previous answer
Thank you, DenisChenu! That works perfectly.
The topic has been locked.