- Posts: 4
- Thank you received: 0
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
- Topic Author
- Offline
- New Member
Less
More
3 years 6 months ago #206524
by aleksandrsa
Show certain answer options only on attempt to skip was created 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
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10110
- Thank you received: 3594
3 years 6 months ago #206525
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Show certain answer options only on attempt to skip
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
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.