Welcome to the LimeSurvey Community Forum

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

New Lime Version won't let me use the same script for array headings

  • Winocll_48635
  • Winocll_48635's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
4 years 6 months ago #188989 by Winocll_48635
On my old limesurvey i could use this in the 'source' question box to create headers for an array (without subquestions in the array)...
Code:
<script type="text/javascript" charset="utf-8">    
  $(document).ready(function(){
 
    // IDENTIFY THIS QUESTION
    var thisQuestion = $('#question{QID}');
 
    // HIDE SUB-QUESTION
    $('.subquestions-list .col-responses .col-answers', thisQuestion).hide();
    $('.subquestions-list thead td', thisQuestion).hide();
    $('.subquestions-list .answertext', thisQuestion).hide();
    $('.subquestions-list col', thisQuestion).attr('width', (100/$('.subquestions-list col', thisQuestion).length)+'%');
 
    // ADD HEADER ROW
    $('table.subquestions-list thead', thisQuestion).prepend('<tr class="new-header">\
    <th colspan="11" style="text-align:left;">Poor<span style="float:right">Excellent</span></th>\
    </tr>');
  });
</script>

But this does not work in my new version of LimeSurvey (Version 3.17.16+190906)
The topic has been locked.
  • Winocll_48635
  • Winocll_48635's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
4 years 4 months ago #190631 by Winocll_48635
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 4 months ago #190632 by tpartner
Can you attach a small sample survey (.lss file) containing only that question?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Winocll_48635
  • Winocll_48635's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
4 years 4 months ago #190633 by Winocll_48635
I think the problem is that i can't get the "addScriptToQuestion" plugin to properly show up in my admin plugins menu. I have v. 4 Limesurvey running...i guess it doesn't recognize the plugin when i put it into the proper server directory. Any ideas?
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 4 months ago #190634 by Joffm

i can't get the "addScriptToQuestion" plugin to properly show up in my admin plugins menu. I have v. 4 Limesurvey running


As far as I see in the LimeStore this script is not LS v4.x compatible
Compatibility: 2.73, 3.x

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 4 months ago - 4 years 4 months ago #190635 by tpartner
Don't bother with that plugin, simply place the script on the source of the question text.

Note that version 4 is not a stable release and should NOT be used for production.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 4 years 4 months ago by tpartner.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • Winocll_48635
  • Winocll_48635's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
4 years 4 months ago #190636 by Winocll_48635
Yes, i'm just using it for testing purposes...thank you for making sure that i knew it was a beta version; i appreciate it.

When i put the script into the 'source' question text it doesn't work. The script is in my OP.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 4 months ago #190639 by tpartner
I say again, can you attach a small sample survey (.lss file) containing only that question?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Winocll_48635
  • Winocll_48635's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
4 years 4 months ago #190825 by Winocll_48635
I have an lsq file...

File Attachment:

File Name: limesurvey..._138.lsq
File Size:7 KB
The topic has been locked.
More
4 years 4 months ago #190828 by jelo

drbray wrote: I have an lsq file...

Which is not what Tpartner asked for.
An LSS export is needed to have a working survey with all the settings you use. An LSQ files is not working without creating a new survey with the correct language and then importing the LSQ into that new survey. Additional work for helping hands.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: tpartner
The topic has been locked.
  • Winocll_48635
  • Winocll_48635's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
4 years 4 months ago #190876 by Winocll_48635
He asked for an LSS of only that question....the only thing i was permitted to export it as question was to use LSQ. I'm unable to upload the whole survey because of client privileges.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 4 months ago - 4 years 4 months ago #190877 by tpartner
Yes, I did ask for a .lss file (a survey export). I don't want to waste my volunteer time creating surveys.

If you can provide a question export, surely you can copy the survey and remove everything except for the relevant question(s).

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 4 years 4 months ago by tpartner.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose