Welcome to the LimeSurvey Community Forum

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

Prevent next if some type of list value selected?

  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
5 years 8 months ago #172554 by blocka
I have a list type question (radio), where the values are populated from five custom attributes in the participant table.

The values are phone numbers.

Not all participants have five phone numbers, so in some cases the list would have sub-questions with the value "None".

I want to prevent the question from submitting if the respondent chooses one of the radio options with the value "None".

How can I do this?
The topic has been locked.
More
5 years 8 months ago #172557 by jelo
Since LS is still lacking a answer relevance, you would need to create a Question validation equation.

Other workarounds (which might work):
1. Create a multiple short text question with default answers filled with an equation that fills only when NOT NONE. Hide this question via CSS and use that question as array filter on your radio list question. That should filter all NONE entries.

2. Use a Multiplechoice question with subquestion relevance. Limit answer to max. 1

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: blocka
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
5 years 8 months ago #172560 by LouisGac
I would do it via question theme to use conditions via Twig.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 8 months ago #172566 by tpartner
Maybe use JavaScript to remove all "None" options.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
5 years 8 months ago #172582 by blocka
Array filter with multiple short question text was the "simplest" approach! Thanks :-)
The topic has been locked.
More
5 years 8 months ago #172626 by jelo

LouisGac wrote: I would do it via question theme to use conditions via Twig.

Well ;-)
www.limesurvey.org/forum/future-features...ubquestion-relevance

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose