Make question (input text) mandatory based on previous answer

2 years 2 months ago #178715 by EdenResident
Hello, my situation is like this.

Q1. I would like to be notified via
  • SMS
  • Email

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.
LimeSurvey Partners
2 years 2 months ago #178718 by DenisChenu

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.
2 years 2 months ago #178719 by EdenResident
Thank you, DenisChenu! That works perfectly.
The topic has been locked.

Start now!

Just create your account and start using Limesurvey today.

Register now