Hide Tip in Multiple Choice with Comments for a specific Questions

More
3 months 3 weeks 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)
<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:
<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?
Attachments:

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
3 months 3 weeks 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.
Official LimeSurvey Partner - partnersurveys.com

Please Log in or Create an account to join the conversation.

More
3 months 3 weeks 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.
Attachments:

Please Log in or Create an account to join the conversation.

More
3 months 3 weeks 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.
Official LimeSurvey Partner - partnersurveys.com

Please Log in or Create an account to join the conversation.

More
3 months 3 weeks ago #184775 by mchaniotakis
Attachments:

Please Log in or Create an account to join the conversation.

More
3 months 3 weeks ago #184778 by tpartner
With JavaScript in the question source:

<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:

<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.
Official LimeSurvey Partner - partnersurveys.com

Please Log in or Create an account to join the conversation.

More
3 months 3 weeks ago #184781 by mchaniotakis
Extremely helpful as always! Thank you very very much!

Please Log in or Create an account to join the conversation.

More
3 months 3 weeks 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

Please Log in or Create an account to join the conversation.

More
3 months 3 weeks 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!

Please Log in or Create an account to join the conversation.

More
3 months 3 weeks ago - 3 months 3 weeks 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.
Official LimeSurvey Partner - partnersurveys.com
Last edit: 3 months 3 weeks ago by tpartner.

Please Log in or Create an account to join the conversation.

More
3 months 3 weeks 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 .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!