Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:
  • Page:
  • 1
  • 2

TOPIC: List with Comment Text

List with Comment Text 1 year 3 months ago #119513

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6114
  • Thank you received: 1356
  • Karma: 532
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: 1 year 3 months ago by tpartner.
The administrator has disabled public write access.
The following user(s) said Thank You: AGK925, Rony

List with Comment Text 1 year 1 month ago #121550

  • LMO
  • LMO's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 1
  • Karma: 0
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.
The administrator has disabled public write access.

List with Comment Text 1 year 1 month ago #121561

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6114
  • Thank you received: 1356
  • Karma: 532
...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 1 month ago by tpartner.
The administrator has disabled public write access.

List with Comment Text 3 months 1 week ago #134673

  • zahorks
  • zahorks's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
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: 3 months 1 week ago by zahorks.
The administrator has disabled public write access.

List with Comment Text 3 months 1 week ago #134679

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6114
  • Thank you received: 1356
  • Karma: 532
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.
The administrator has disabled public write access.

List with Comment Text 3 months 1 week ago #134681

  • zahorks
  • zahorks's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
I'm honestly not sure. I'm not a developer.
The administrator has disabled public write access.

List with Comment Text 3 months 1 week ago #134691

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9254
  • Thank you received: 1319
  • Karma: 382
@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 developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 1.049 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form