Welcome to the LimeSurvey Community Forum

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

Allocate weighting across subquestions: Ranking with Percentage

  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 4 months ago #144101 by tpartner
Correct, just leave it as a normal multiple-numeric with whatever sum value settings you need.

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: teracomp
The topic has been locked.
  • teracomp
  • teracomp's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
7 years 4 months ago #144115 by teracomp
tpartner is my official HERO! Thanks!! I can now deploy this survey on Monday as planned!

There's an entire tutorial wrapped up in the code you provided. I have some experience with AngularJS (deployed 5 or 6 apps), but limited interaction with jQuery as a result. I love seeing how jQuery interacts the DOM with LimeSurvey. The flexibility is unparalleled...well...if you have the skills like tpartner has!

Dave Phillips
The topic has been locked.
  • teracomp
  • teracomp's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
7 years 4 months ago #144117 by teracomp
To take it one step further, i tweaked the interface to have the label inline with the slider and incorporated a media query to revert back to 100% width at the 800px point:
Code:
function checkSize(){
  if ( $(window).width()<800 ) {
      $('.control-label').width('100%').css('text-align','left');
      $('.slider-container').width('100%').css('float','none').css('margin-top','0').css('margin-bottom','0');
  } else {
      $('.control-label').width('16%').css('text-align','right');
      $('.slider-container').width('83%').css('float','right').css('margin-top','0').css('margin-bottom','0');
  }
}
$(document).ready(function() {
    checkSize();
    $(window).resize(checkSize);
      ....(etc)

Added a screenshot to demonstrate the results

Dave Phillips
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 4 months ago #144129 by DenisChenu
In general : i update
input type='text' data-number='true'
to
input type='number'

(looking at your first screenshot)

With good step etc ....
A plugin idea ;) (for me)

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.
  • teracomp
  • teracomp's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
7 years 2 months ago #146381 by teracomp
I'm building a release version for my survey which prompted me to look at this again. In going through the template code, I found this is in bootstrap-slider.js, line 749.:
Code:
732  defaultOptions: {
733    id: "",
744    min: 0,
745    max: 10,
746    step: 1,
747    precision: 0,
748    orientation: 'horizontal',
749    value: 5,
750    range: false,
751    selection: 'before',
Notice value: 5

Setting this to 0 fixed the issue.

Is there a reason why this would be 5 instead of 0?

Dave Phillips
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose