Welcome to the LimeSurvey Community Forum

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

Hide Tip in Multiple Choice with Comments for a specific Questions

  • mchaniotakis
  • mchaniotakis's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 10 months ago #184769 by mchaniotakis
Hi all,

I know there has been a big discussion on how to hide tips. I have tried many different things but I was unable to make it happen.

I want to have a multiple choice question with comments.



I managed to remove comments for most of the cases (code below)
Code:
<script type="text/javascript" charset="utf-8">
    $(document).on('ready pjax:scriptcomplete',function() {
    $('#question{QID} ul.answers-list li:eq(0) input:text').remove();
    $('#question{QID} ul.answers-list li:eq(1) input:text').remove();
    $('#question{QID} ul.answers-list li:eq(2) input:text').remove();
    $('#question{QID} ul.answers-list li:eq(3) input:text').remove();
    $('#question{QID} ul.answers-list li:eq(4) input:text').remove();
    $('#question{QID} ul.answers-list li:eq(5) input:text').remove();
        $('#question{QID} ul.answers-list li:eq(6) input:text').remove();
    $('#question{QID} ul.answers-list li:eq(7) input:text').remove();
        $('#question{QID} ul.answers-list li:eq(8) input:text').remove();
        });
</script>

Now the only thing that remains to do, is to remove the tip about comment.

The tip is defined by the following:
Code:
<div id="vmsg_2378_commented_checkbox" class="ls-question-message ls-em-tip em_commented_checkbox ls-em-success">
    <span class="fa fa-exclamation-circle" aria-hidden="true"></span>
    Comentar sólo si escoge una respuesta.</div>

However, whatever I tried, this seems impossible.

Could someone help?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 10 months ago #184770 by tpartner
There should be a question setting to hide the tip.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • mchaniotakis
  • mchaniotakis's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 10 months ago #184772 by mchaniotakis
Hi tpartner,

Sorry for not mentioning this. I have already turned this on (hide tip)




However, the problem persists, and this is the reason why I was trying css/javascript.

Just to mention a few more details about my installation; we are running this on a 3.17 pro version.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 10 months ago #184774 by tpartner
Can you attach a small sample survey (.lss file) containing only the relevant questions?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • mchaniotakis
  • mchaniotakis's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 10 months ago #184775 by mchaniotakis
Please find it attached!
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 10 months ago #184778 by tpartner
With JavaScript in the question source:

Code:
<script type="text/javascript" charset="utf-8">
  $(document).on('ready pjax:scriptcomplete',function() {
    $('#question{QID} .em_commented_checkbox').remove();
  });
</script>

With CSS in the question source:

Code:
<style type="text/css">
  #question{QID} .em_commented_checkbox {
    display: none !important;
  }
</style>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • mchaniotakis
  • mchaniotakis's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 10 months ago #184781 by mchaniotakis
Extremely helpful as always! Thank you very very much!
The topic has been locked.
More
4 years 10 months ago #184788 by jelo
So the "hide tip" button no longer working everywhere? More and more workarounds needed.
Or is there a bugreport?

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • mchaniotakis
  • mchaniotakis's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 10 months ago #184802 by mchaniotakis
I did not create a bug report, as this is probably caused by the introduction of the code above to hide comment boxes (I think that hiding tips works if I do not use the code above to hide comment-boxes).

Nevertheless, it seems from the many questions on this topic (some of which are very new), that there are issues with hiding tips, and that maybe these workarounds could be included in the limesurvey manual (for each question type). For me, it is much easier to just put a piece of simple code and make this work!
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 10 months ago - 4 years 10 months ago #184805 by tpartner
Hmm...I don't see how your code could cause the tip behaviour.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 4 years 10 months ago by tpartner.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 10 months ago #184812 by DenisChenu
There are an issue with hide-tip, but i don't report it …
Because i already fixed it and add a comment, but the previous code was readded.

github.com/LimeSurvey/LimeSurvey/blob/ma...late-core.js#L80-L82

Then : please report …

Else : you can fix with adding
.tip-was-hidden{display:none}

in custom.css

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.

Lime-years ahead

Online-surveys for every purse and purpose