Welcome to the LimeSurvey Community Forum

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

Show certain answer options only on attempt to skip

  • aleksandrsa
  • aleksandrsa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #206524 by aleksandrsa
The idea is to only show "Don't know" and "Refuse" answer option if respondent attempts to skip a question. This, as I imagine, would require (a) making the question mandatory, (b) hiding certain answer options, (c) revealing hidden option on an attempt to skip, altogether with a warning message.

Obviously, this would require some Javascript magic to hide the options and then wait for the trigger to reveal them. While I find examples of hiding certain elements of questions, still can't locate an example of accessing the trigger for the "Mandatory" message to use it further in the desired scenario.

Any ideas are very much appreciated :)

==============
Sample scenario:

State 1:

Question? * (mandatory)
1. Yes
2. No

Action: attempt to [Next] w/o selecting any option

State 2:

Question? * (Warning message)
1. Yes
2. No
3. Don't know
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #206525 by tpartner
Have a look at this thread for detecting a mandatory error - forums.limesurvey.org/forum/can-i-do-thi...-after-submit#204288

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • aleksandrsa
  • aleksandrsa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #206568 by aleksandrsa
Replied by aleksandrsa on topic Show certain answer options only on attempt to skip
Thanks for a hint! This definitely looks like a great starting point to build the solution further. :)
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose