Welcome to the LimeSurvey Community Forum

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

multiple choice: 7 answers whereby 2 two are paradoxical - how to adjust the Que

  • JohnDoe2000
  • JohnDoe2000's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 7 months ago #123112 by JohnDoe2000
i have a multiple choice question with 7 possible answers, e.g.
my face contains following parts:
- one nose
- one ear
- a right ear --> answer 5
- a mouth
- two ears ---> answer 3
-....
Is it possible to adjust the question so that question 3 and question 5 can't be chosen at the same time?
I would be glad if you could help me and it would be great if you could also tell me, if it's possible if there is a further case like this in this multiple choice-question, e.g. for answers 5 and 3 as well as for the answers 4 and 6.

Thank you.
The topic has been locked.
More
8 years 7 months ago #123117 by david2013
I guess you can do it in 2 ways: jQuery or Server side validation using EM
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 7 months ago #123264 by DenisChenu
Hi,

manual.limesurvey.org/Question_type_-_Mu...28em_validation_q.29

Then, if your question code are MULTI, and ech subquestion have code SQ1,SQ2 ....
If you don't want SQ3 at same time than SQ5:
Code:
count(MULTI_SQ3,MULTI_SQ5) <2
And for as 4+6 at same time
Code:
count(MULTI_SQ3,MULTI_SQ5) <2 AND count(MULTI_SQ4,MULTI_SQ6) <2

See manual.limesurvey.org/Expression_Manager for all variable and function.

Denis

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
8 years 7 months ago #123280 by rola
i normally use JQuery function....
Code:
<script>
$(document).ready(function (){
 
$("#[YourQuestionId]").find(".checkbox").change(function() {
 
        var chId=$(this).attr('id');
 
        if($(this).is(":checked")) {
 
             if (chId == '[Anserwer5id]' ){
                      $('#[Anserwer3id]').removeAttr('checked');
              }
 
             if (chId == '[Anserwer3id]' ){
                      $('#[Anserwer5id]').removeAttr('checked');
              }
         }
});
 
 
});
</script>
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose