List with Comment Text

More
2 years 1 month ago - 2 years 1 month ago #119513 by tpartner
tpartner replied the topic: List with Comment Text
To ensure that the script only affects the question it is loaded in and not other questions on the same page, you could use this:

<script type="text/javascript" charset="utf-8">	
	$(document).ready(function() {
		$('#question{QID} p.comment label').text('TEXT FOR COMMENT BOX:');
	});		
</script>

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 2 years 1 month ago by tpartner.
The following user(s) said Thank You: AGK925, Rony

Please Log in to join the conversation.

More
1 year 11 months ago #121550 by LMO
LMO replied the topic: List with Comment Text
Thanks, I used the code and when looking at the question with "preview this question" it works fine, but at the actual survey it doesn't work anymore and the customized text is gone.

Hopefully there is a workaround, because I do not want to change te text for all the list questions with comments.

Please Log in to join the conversation.

More
1 year 11 months ago - 1 year 11 months ago #121561 by tpartner
tpartner replied the topic: List with Comment Text

...but at the actual survey it doesn't work anymore and the customized text is gone.

Do you have any javaScript errors in the console? Can you activate a small test survey for us to see?

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 1 year 11 months ago by tpartner.

Please Log in to join the conversation.

More
1 year 1 month ago - 1 year 1 month ago #134673 by zahorks
zahorks replied the topic: List with Comment Text
I have the same problem and have just tried using the code posted previously (copied below) with no luck. Any suggestions as to why this is not working for me?
<script type="text/javascript" charset="utf-8">	
$(document).ready(function(){
 
 $('.list-with-comment p.comment label').text('TEXT FOR COMMENT BOX:');
 
});
</script>
Last Edit: 1 year 1 month ago by zahorks.

Please Log in to join the conversation.

More
1 year 1 month ago #134679 by tpartner
tpartner replied the topic: List with Comment Text
It works for me in 2.06 and 2.5. Do you have any JavaScript errors?

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.

More
1 year 1 month ago #134681 by zahorks
zahorks replied the topic: List with Comment Text
I'm honestly not sure. I'm not a developer.

Please Log in to join the conversation.

More
1 year 1 month ago #134691 by DenisChenu
DenisChenu replied the topic: List with Comment Text
@zahorks : activate your javascript console to see error.
- developers.google.com/web/tools/chrome-d...g/console/console-ui
- developer.mozilla.org/en-US/docs/Mozilla...Debugging_JavaScript
- msdn.microsoft.com/en-us/library/hh696634.aspx

@tparner : maybe we have to add a "debugging javascript" somewhere in manual and ask to Carsten to link "javascript console" keywork to the page ?

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

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now