Welcome to the LimeSurvey Community Forum

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

Multiple choice & exclusive options q

  • DB1324
  • DB1324's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 2 months ago #129928 by DB1324
Hi,

I am designing a questionnaire which has a multiple choice question, with answers A, B, C, D, E, None of the above, and Other (the 'Other' field from question settings).

Using the exclusive options feature I can cause all the other options to grey out if a user selects 'None of the above', which is great, but ideally if someone picks this option I'd like them to be able to enter some text in 'Other' too.

So, is it possible to have an 'exclusive options' style grey out that affects all but TWO responses, the selected one and an 'other' option?

(A thousand apologies if the answer is obvious - I'm very new to LimeSurvey :blush: )

Thank you!
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 2 months ago #129932 by holch
Replied by holch on topic Multiple choice & exclusive options q
No, exclusive means exclusive. so just this one response is valid. Now you might be able to do something with a custom Javascript, but I am no expert on this.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: DB1324
The topic has been locked.
  • DB1324
  • DB1324's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 2 months ago #129933 by DB1324
Replied by DB1324 on topic Multiple choice & exclusive options q
Thank you for the prompt response. Unfortunately I am no expert in Javascript either - I was hoping I'd overlooked something simple.
The topic has been locked.
More
8 years 2 months ago - 8 years 2 months ago #129940 by mguerrero
Replied by mguerrero on topic Multiple choice & exclusive options q
Hi,

I think with this example achieved it what you need.

You must remove the exclusive option
Code:
<script>
 
$(document).ready(function() {
 
  var thisQuestion = $('#question{QID}');                
 
  $('ul.subquestions-list li', thisQuestion).addClass('normalOpt');
  $('ul.subquestions-list li', thisQuestion).each(function(i) {
    $('.other-item').removeClass('normalOpt').addClass('exlusiveOpt');
    $('.exlusiveOpt').prev().removeClass('normalOpt').addClass('exlusiveOpt2');
  });
 
 
  $('.exlusiveOpt2 input[type=checkbox]').change(function(event) {
    if($(this).is(':checked'))
    {
      $('.normalOpt input[type=checkbox]').prop('disabled', true);
      $('.normalOpt input[type=checkbox]').prop("checked", false);
      $('.normalOpt input[type=checkbox]').val('');
    }
    else{
      $('.normalOpt input[type=checkbox]').prop('disabled', false);
 
    }
  });
 
 
 
});
 
</script>


Cheers
Last edit: 8 years 2 months ago by mguerrero.
The following user(s) said Thank You: DB1324
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 2 months ago #129946 by DenisChenu
Replied by DenisChenu on topic Multiple choice & exclusive options q
No need javascript : use filter for each subquestion.

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: DB1324
The topic has been locked.
  • DB1324
  • DB1324's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 2 months ago #129950 by DB1324
Replied by DB1324 on topic Multiple choice & exclusive options q
I don't suppose you would be so kind as to give me a hint on how to do that (I can see filters in advanced settings for the question, but not at level of subquestions...)?

Thank you!
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 2 months ago #129959 by DenisChenu
Replied by DenisChenu on topic Multiple choice & exclusive options q
You need to be on 2.06 version, don't remind the exact build. It's when you edit the Sub question.

You can copy paste the "auto generated" equation done with array_filter (with question logic files) , and remove it after.

Denis
PS : we really need to do a clean manual part for this ....

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: DB1324
The topic has been locked.
More
7 years 11 months ago #133685 by first
Replied by first on topic Multiple choice & exclusive options q
I tried and this actually hide the desired sub-question .. not disable them like exclusive option do...

Survey Designer and Programmer
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 11 months ago #133687 by DenisChenu
Replied by DenisChenu on topic Multiple choice & exclusive options q

OMdev wrote: I tried and this actually hide the desired sub-question .. not disable them like exclusive option do...

We have a manual : manual.limesurvey.org/Question_type_-_Mu...rray_filter_style.29

Did you try to use deactivate here ?

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 topic has been locked.
More
7 years 11 months ago #133698 by first
Replied by first on topic Multiple choice & exclusive options q
Kool.. Just slipped from my mind...

Survey Designer and Programmer
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose