Welcome to the LimeSurvey Community Forum

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

List with Comment Text

More
8 years 11 months ago #119478 by Rony
Replied by Rony on topic List with Comment Text
ok. No, I'm asking for this type of question even
The topic has been locked.
More
8 years 11 months ago - 8 years 11 months ago #119479 by AGK925
Replied by AGK925 on topic List with Comment Text
OK, for the question you want to change the comment box label, in the box where you type the question text there is a button called source. When that is selected you can see the source code for the question. Here you will type
Code:
<script type="text/javascript" charset="utf-8">  
$(document).ready(function(){
 
 $('.list-with-comment p.comment label').text('TEXT FOR COMMENT BOX:');
 
});
</script>

Below the code for the question text.
Last edit: 8 years 11 months ago by AGK925. Reason: edit code
The following user(s) said Thank You: vinz3g
The topic has been locked.
More
8 years 11 months 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
8 years 11 months 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
8 years 11 months 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
8 years 11 months ago - 8 years 11 months 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: 8 years 11 months 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 5 days ago - 8 years 5 days 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 5 days ago by zahorks.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 4 days 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 4 days 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 4 days 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.

Lime-years ahead

Online-surveys for every purse and purpose