Check out the LimeSurvey source code on GitHub!

Exclusive options for Multiple choice not working?

More
4 years 10 months ago - 4 years 10 months ago #78545 by holch
I am setting up a survey where I would need the exclusive option quite a few times, but it seems not to work. Usually it should unmark any other option chosen, when one of the exclusive option is marked, correct?

Latest 1.92 installed on XAMPP on local machine.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
Last Edit: 4 years 10 months ago by holch.

Please Log in to join the conversation.

More
4 years 10 months ago #78547 by TMSWhite
The exclusive option currently works differently in 1.92 to support proper cascading. Rather than disabling the other checkboxes, it flags them as irrelevant so they become invisible. The advantage of this is that if you accidentally click the exclusive option and want to change your mind, you don't lose the values of anything else entered on that question. The disadvantage is that some users might get confused by the fact that the other questions disappear (but that is a training issue). There is a proposal to have exclusive option disable the other questions instead of hide them, but that would require a significant refactoring of EM, so it is on hold.

See this example survey .

Please Log in to join the conversation.

More
4 years 10 months ago #78551 by holch
Hmmm, mine do not disappear (using Chrome).

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
4 years 10 months ago - 4 years 10 months ago #78553 by DenisChenu
Hello Tom,

Maby some idea, to have less refactoring.

Don't disable inout, but hide them.

ACtual issue:
('#java').hide();

New issue:
('#java input').hide();

What do you mean of that ?

PS: holch : clean the cache ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
Last Edit: 4 years 10 months ago by DenisChenu.

Please Log in to join the conversation.

More
4 years 10 months ago #78554 by TMSWhite
Please try using the default template. It works for me in Chrome, Firefox, and IE.

Please Log in to join the conversation.

More
4 years 10 months ago #78557 by TMSWhite
Denis-

Exclusive option does accurately hide questions already (using relevance criteria). Refactoring would be needed if we wanted to disable them but not hide them. I tried a simple change of having relevance always disable questions instead of hide them, but that looks awful (e.g. array-filtered rows would still appear, but be disabled). So, disabling questions for exclusive option would require pulling it out of the internal relevance criteria and create a different set of logic for it.

Please Log in to join the conversation.

More
4 years 10 months ago #78559 by holch
Or does this not work in the preview?

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
4 years 10 months ago - 4 years 10 months ago #78561 by holch
Just made a quick test survey and it doesn't show in the preview! But once the survey is activated it seems to work.

I didn't test it before, because the questionnaire is extremly long and those questions come fairly at the end.

I think this should show in the preview. As far as I remember it did before.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
Last Edit: 4 years 10 months ago by holch.

Please Log in to join the conversation.

More
4 years 10 months ago - 4 years 10 months ago #78562 by TMSWhite
Survey,group, and question-level previews all work for me. Did you check the survey logic file to confirm you are using a valid exclusive option? Try loading the sample survey to see if you have trouble with it too.
Last Edit: 4 years 10 months ago by TMSWhite.

Please Log in to join the conversation.

More
4 years 10 months ago #78565 by holch
Ok, Denis, this goes to you: doesn't work in Citronade... ;-)

Default works fine. This is a real pitty, because the default theme is horrible. We really need to make sure that these things work well in most templates. I am not sure what is breaking those things. We need a clean simple template with nece code that just works and where you just need to include a logo and change colors and stuff in CSS (which should have no impact at all on those kind of things, right?).

So I guess I will have to use the default theme for now then.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
4 years 10 months ago #78566 by holch
weird: with default theme and another question it doesn't work either. Will try the cache again.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
4 years 10 months ago #78567 by DenisChenu

TMSWhite wrote: Denis-

Exclusive option does accurately hide questions already (using relevance criteria). Refactoring would be needed if we wanted to disable them but not hide them. I tried a simple change of having relevance always disable questions instead of hide them, but that looks awful (e.g. array-filtered rows would still appear, but be disabled). So, disabling questions for exclusive option would require pulling it out of the internal relevance criteria and create a different set of logic for it.

Yep,

It's why i say hide the input and not deactiavte it.

Maybe a solution is
replace all hide() in LimeExpressionManager.php by
lshide({$arg})

And add in survey_runtime:
jQuery.fn.lshide = function(qid) {
    $(this).hide();
};
jQuery.fn.lsshow = function(qid) {
    $(this).show();
};
After we can do some test on qid class:
jQuery.fn.lshide = function(qid) {
if ($("#question"+qid).hasClass('multiple-opt')){
    $(this)find('input').hide();
}else{
    $(this).hide();
}
};

I made a quick test with:
jQuery.fn.lshide = function(qid) {
    $(this).find('input').hide();
};
jQuery.fn.lsshow = function(qid) {
    $(this).find('input').show();
};
Here: limesurvey.sondages.pro/36161/lang-en
It work like a charm.

I didn't make something for group, but we still use something like this.

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 (or search sondages pro).

Please Log in to join the conversation.

More
4 years 10 months ago #78568 by TMSWhite
There was a standard set of EM-related CSS added to to all templates. I believe Citronade's version of those additions were refactored in an effort to simplify/reduce the EM-related CSS. Try replacing the Citronate-version of EM CSS with that from the default template and see if that fixes it for you.

Please Log in to join the conversation.

More
4 years 10 months ago #78569 by holch
I just tried with another question following this one (codes seem to be fine, looked in the logik file) but it just doesn't do anything (default theme, cache cleared, etc.).

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
4 years 10 months ago #78570 by DenisChenu
I test with actual citronade,

No problem it work like a charm.

Can you export your survey ?

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 (or search sondages pro).

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form