Welcome to the LimeSurvey Community Forum

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

List with Comment Text

More
9 years 5 days ago #119480 by Rony
Replied by Rony on topic List with Comment Text
Nice,AGK925
I'll try
Thank you!
The topic has been locked.
More
9 years 5 days ago #119493 by Rony
Replied by Rony on topic List with Comment Text
It works perfectly. Thank you again!
The topic has been locked.
More
9 years 5 days ago #119494 by AGK925
Replied by AGK925 on topic List with Comment Text
Glad it worked. I am running an older version and I have not tried to use the code on multiple questions so I wasn't positive it would work for you.
The following user(s) said Thank You: Rony
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 4 days ago - 9 years 4 days ago #119513 by tpartner
Replied by tpartner on 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:

Code:
<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: 9 years 4 days ago by tpartner.
The following user(s) said Thank You: AGK925, Rony
The topic has been locked.
More
8 years 10 months ago #121550 by LMO
Replied by LMO on 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.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 10 months ago - 8 years 10 months ago #121561 by tpartner
Replied by tpartner on 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: 8 years 10 months ago by tpartner.
The topic has been locked.
More
8 years 1 week ago - 8 years 1 week ago #134673 by zahorks
Replied by zahorks on 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?
Code:
<script type="text/javascript" charset="utf-8">  
$(document).ready(function(){
 
 $('.list-with-comment p.comment label').text('TEXT FOR COMMENT BOX:');
 
});
</script>
Last edit: 8 years 1 week ago by zahorks.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 1 week ago #134679 by tpartner
Replied by tpartner on 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.
The topic has been locked.
More
8 years 1 week ago #134681 by zahorks
Replied by zahorks on topic List with Comment Text
I'm honestly not sure. I'm not a developer.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 1 week ago #134691 by DenisChenu
Replied by DenisChenu on 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 , plugin development .
I don't answer to private message.
The topic has been locked.
More
6 years 1 week ago - 6 years 1 week ago #167523 by krosser
Replied by krosser on topic List with Comment Text

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

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


Hey guys!
I've tried this in LS version 3.6.2 and it doesn't work. Does anyone know what should be tweaked in the code in order to work?
Cheers!! :)

I'm using the latest LS 3.22 hosted on LS servers, not installed locally.
Last edit: 6 years 1 week ago by krosser. Reason: figured that QID shouldn't be changed
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 1 week ago #167529 by tpartner
Replied by tpartner on topic List with Comment Text
This should work in 3.x:

Code:
<script type="text/javascript" charset="utf-8">
  $(document).on('ready pjax:scriptcomplete',function(){
    $('#question{QID} .text-item 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.
The following user(s) said Thank You: ecoplan, ConradNg, krosser
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose