- Posts: 10611
- Thank you received: 3691
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
- Away
- LimeSurvey Community Team
Less
More
7 years 4 months ago #144101
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Allocate weighting across subquestions: Ranking with Percentage
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
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 162
- Thank you received: 14
7 years 4 months ago #144115
by teracomp
Dave Phillips
Replied by teracomp on topic Allocate weighting across subquestions: Ranking with Percentage
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!
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
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 162
- Thank you received: 14
7 years 4 months ago #144117
by teracomp
Dave Phillips
Replied by teracomp on topic Allocate weighting across subquestions: Ranking with Percentage
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:
Added a screenshot to demonstrate the results
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
Attachments:
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13910
- Thank you received: 2548
7 years 4 months ago #144129
by DenisChenu
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.
Replied by DenisChenu on topic Allocate weighting across subquestions: Ranking with Percentage
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)
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
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 162
- Thank you received: 14
7 years 2 months ago #146381
by teracomp
Dave Phillips
Replied by teracomp on topic Allocate weighting across subquestions: Ranking with Percentage
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.:
Notice value: 5
Setting this to 0 fixed the issue.
Is there a reason why this would be 5 instead of 0?
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',
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.