Welcome to the LimeSurvey Community Forum

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

Change Mandatory Depending on Previous Question

  • austint
  • austint's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 2 months ago - 1 year 2 months ago #239354 by austint
Your LimeSurvey version: Version 3.23.4+200922
Own server or LimeSurvey hosting: LimeSurvey hosting
Survey theme/template:
Company theme but mostly vanilla


In my survey, there's sections of List(radio) directly followed by comments. The List(radio) is mandatory and the comments are not mandatory. I was wondering if it was at all possible to have it so the comments become mandatory if the previous question had "Above Standard" or "Below Standard" selected. Basically, if "Standard" is selected, the comments are not mandatory, but if any of the other options are selected, the comment become mandatory. It seems like there is a way since there looks to be options to change the QCODE.mandatory.
Any help or ideas are appreciated.
 
Last edit: 1 year 2 months ago by austint. Reason: Picture did not embed

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 2 months ago #239356 by Joffm
You can use question validation of the comments
Like
Q1=="Standard" OR !is_empty(Comment)

But you'd better show the exact structure and coding by providing a lss export of these relevant questions.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: austint

Please Log in to join the conversation.

  • austint
  • austint's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 2 months ago #239357 by austint

You can use question validation of the comments
Like
Q1=="Standard" OR !is_empty(Comment)

This is what I needed. Thank you.
I was missing the !is_empty from mine originally. 

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose