Welcome to the LimeSurvey Community Forum

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

Titles for subquestions

  • cstcandy
  • cstcandy's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 2 months ago #147474 by cstcandy
Replied by cstcandy on topic Titles for subquestions
Hi all, I have another solution for the sake of displaying sub-titles.
I use the following script to "hide" the checkbox of particular codes.
The Blankbutton.png is a transparent picture and saved in the template editor.

My next question - is it possible to randomize the answers within groups and then randomize between groups? Thanks so much!

<script type="text/javascript" charset="utf-8">

$(document).ready(function(){

var templatePath = $('head link[href*="template.css"]').attr('href').replace(/template.css/, '');

// Apply images to Group 1 $("input#answerYYYYXYYYYXYYYYYY").imageTick({

// Image to use as a selected state of the checkbox
tick_image_path: templatePath+"Blankbutton.png",
// Image to use as a non-selected state
no_tick_image_path: templatePath+"Blankbutton.png",
// Class to apply to all checkbox images that are dynamically created
image_tick_class: "checkboxes"
});
});

</script>

The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 2 months ago #147485 by tpartner
Replied by tpartner on topic Titles for subquestions

My next question - is it possible to randomize the answers within groups and then randomize between groups? Thanks so much!

You could do that with with JavaScript but without knowing the structure of your template it's impossible to give a code example.

An alternative may be to use several questions and CSS to make them appear as one. Again without template details it's impossible to give a code example.

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
5 years 1 week ago #181920 by tixeon
Replied by tixeon on topic Titles for subquestions
Is there a solution for this that works in 3.15.9?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 1 week ago #181935 by tpartner
Replied by tpartner on topic Titles for subquestions
What have you tried?

Can you attach a small sample survey (.lss file)?

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
5 years 1 week ago #181984 by tixeon
Replied by tixeon on topic Titles for subquestions
I have tried the script at: www.limesurvey.org/forum/design-issues/1...tions?start=0#147393

LSS attached

File Attachment:

File Name: limesurvey...6833.lss
File Size:24 KB
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 1 week ago - 5 years 1 week ago #182027 by tpartner
Replied by tpartner on topic Titles for subquestions
This works in 3.16.x:

Code:
<script type="text/javascript" charset="utf-8">    
 
  $(document).on('ready pjax:scriptcomplete',function(){
    // First Row
    $('#question{QID} .question-item:eq(0)').addClass('sub-header').find('input').remove();
    // Fifth Row
    $('#question{QID} .question-item:eq(4)').addClass('sub-header').find('input').remove();
    // Ninth Row
    $('#question{QID} .question-item:eq(8)').addClass('sub-header').find('input').remove();
      // Fourteenth Row
    $('#question{QID} .question-item:eq(13)').addClass('sub-header').find('input').remove();
  });
</script>
<style>
  .question-item.sub-header,
  .question-item.sub-header label {
    padding: 0;
    margin-bottom: 0;
  }
 
  .question-item.sub-header label::before,
  .question-item.sub-header label::after {
    display: none;
  }
</style>



Sample survey attached:

File Attachment:

File Name: limesurvey...8331.lss
File Size:25 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 5 years 1 week ago by tpartner.
The following user(s) said Thank You: krosser
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose