Welcome to the LimeSurvey Community Forum

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

Multiple choice based conditional question groups: problem with defaults

  • phylll
  • phylll's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 weeks 1 day ago #259155 by phylll
LimeSurvey version: LimeSurvey Cloud Version 6.4.12, hosted by LimeSurvey, using the standard Fruity TwentyThree theme.
==================

Dear experts,

The closest I was able to find in the forums is this 3-years-old thread with very useful input by Joffm:  forums.limesurvey.org/forum/can-i-do-thi...ltiple-choice#209614

Basically, I've built a survey that first asks a multiple choice question with checkmarks (completely open, respondents can select between zero options and every available option) and then they get shown one question group per selected option, or none at all if they selected no options at all. Works fine.

As an additional feature, I've added respondent-specific defaults to the multiple choice question. So, the participant table holds extra information in attributes, and based on those attributes, some of the checkmarked subquestions in the multiple choice question "rcptSlctr" get automatically checked by default. Works fine, as well.

I've built this as a "survey template" not in the LimeSurvey sense but as an incomplete survey that I export as an LSS file, modify through a Python script to generate all these repetitive question groups that would be tedious and error-prone to build per hand every time, and reimport the new LSS into LimeSurvey. Again, works fine in most ways, and LimeSurvey's logic checks run fine.

Except that now, *deselecting* some of these defaults gets ignored *most of the time*. I am able to select additional question groups in my initial multiple choice question, and deselect others that were defaults, but then I still usually get a selection of question groups to answer that tends to include all the choices I tampered with, but not all (so the group relevance checks/conditions do work wherever I had not touched the checkboxes on the multiple choice question page).

Is this sufficiently clear or should I make screenshots? I've attached the LSS file I'm using. The problem tends to appear more often, if not only (no longer sure after lots of testing) for slightly larger number of choices and question groups than those 3. In my "production version", I have 23 entries/question groups, and there is happens all the time. If necessary, I can create an anonymized LSS with 23 entries, but I wanted to first give it a try and see if there is some obvious mistake I've made. (It's an internal staff feedback tool in my organization, so I need to anonymize everything before I post the LSS.)

Thank you very much for your support! 

File Attachment:

File Name: limesurvey...9999.lss
File Size:57 KB

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 weeks 1 day ago #259172 by tpartner
I would start with removing the unnecessary HTML from your equation question.

 

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

  • phylll
  • phylll's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 weeks 1 day ago #259177 by phylll
Many thanks for picking this up, Tony. Unfortunately, that is not the problem (since my python script strips all HTML from the equation question already, and I just accidentally readded it using the LimeSurvey web WYSIWIG editor for anonymizing my LSS).

By the way, is there a way to avoid that with the editor? Does using the source code editor help or does LimeSurvey add extra HTML afterwards?

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 weeks 1 day ago #259178 by tpartner

By the way, is there a way to avoid that with the editor? Does using the source code editor help or does LimeSurvey add extra HTML afterwards?
LimeSurvey adds nothing, it is a "feature" of the editor. I suggest setting your editor preferences to "Popup".

 

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: phylll

Please Log in to join the conversation.

  • phylll
  • phylll's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 weeks 4 days ago #259429 by phylll

Except that now, *deselecting* some of these defaults gets ignored *most of the time*. I am able to select additional question groups in my initial multiple choice question, and deselect others that were defaults, but then I still usually get a selection of question groups to answer that tends to include all the choices I tampered with, but not all (so the group relevance checks/conditions do work wherever I had not touched the checkboxes on the multiple choice question page).

Does anyone have any idea that might help me? See original post for more details and my LSS file.

Many thanks for your time!

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 weeks 4 days ago #259431 by DenisChenu
If you deselect a checkbox : it was set to "", then it's empty.

If you want to use an equation to set default on multiple choice: you must use another equation.

1. EQste : {MULTI_SQ1=if(is_empty(EQcheck.NAOK),"Y",MULTI_SQ1.NAOK=
2. EQcheck : 1

Better to use Equation advanced settings for this.
The no issue with HTML editor. It's done 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.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 weeks 4 days ago #259436 by Joffm
And you should put the equation into a separate group before the WELCOME group.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • phylll
  • phylll's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 weeks 3 days ago #259453 by phylll
Fantastic! Thank you both very much, DenisChenu and Joffm! With those two tweaks, everything works as intended.

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose