Welcome, Guest
Username: Password: Remember me

TOPIC: array numbers with equals sum (or dual scale slider layout)

array numbers with equals sum (or dual scale slider layout) 2 years 11 months ago #61002

  • lovepade
  • lovepade's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 93
  • Karma: 0
1. sorry for really bringing a lot of heat to the forum today :-/

2. I originally had two questions, with slider layout and equals sum = 100. The question were like this. A: "How do you think the school is prioritizing theese four issues? Distribute 100 points." B: How do you thing the school ought to prioritize these four issues?. Distribute 100 points".

Now since I for some wierd reason have trouble with slider layouts I decided to rethink the question. It strikes me that a dual scale or array numbers is ideal:

slider layout:
_______ | Current priority | Ideal priority
Issue 1 |  ---*----------  |  ----*---------
Issue 2 |  ---------*----  |  ------------*-
Issue 3 |  ------*-------  |  ------*-------
Issue 4 |  ------*-------  |  ----*---------

or simpel numeric input
_______ | Current priority  | Ideal priority
Issue 1 |        20         |  25
Issue 2 |        40         |  30
Issue 3 |        30         |  15
Issue 4 |        10         |  29
´´´´´´´´   TOTAL: 100  OK   |  TOTAL: 99   -1

I guess I will add this as a feature request - but is it possible to do something like this (with validation i mean - array numbers come awefully close).

3. Off for a walk :-)

Thank you all in advance.
Last Edit: 2 years 11 months ago by lovepade.
The administrator has disabled public write access.

Re: array numbers with equals sum (or dual scale slider layout) 2 years 11 months ago #61038

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 3837
  • Thank you received: 688
  • Karma: 330
You can use two multiple-numerics and line them up side-by-side with CSS, See - www.limesurvey.org/en/forum/can-i-do-thi...y-odd-question#61037
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
The following user(s) said Thank You: lovepade

Re: array numbers with equals sum (or dual scale slider layout) 2 years 11 months ago #61041

  • lovepade
  • lovepade's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 93
  • Karma: 0
thanks. That's intersting. It's been a while since i tinkered seriously with css. Do you maybe have some example code from the sceenshot you provided in the link?

Any ways - thanks :-D
The administrator has disabled public write access.

Re: array numbers with equals sum (or dual scale slider layout) 2 years 11 months ago #61045

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 3837
  • Thank you received: 688
  • Karma: 330
I did this really quickly for the default template so it could definately be improved but it will get you started.

Replace "11", "22" and "33" with the question IDs.
.group-name {
	display: block;
	width: 100%;
	margin-bottom: 5px;
}
 
#question11,
#question22,
#question33 {
	float: left;
}
 
#question11 {
	margin-left: 10%;
}
 
#question11 table,
#question22 table,
#question33 table {
	width: 100% !important;
}
 
#question11 p.tip,
#question22 p.tip,
#question33 p.tip {
	display: none;
}
 
#question22 label,
#question33 label {
	display: none;
}
 
#question11 td.questiontext {
	padding-left: 150px;
}
 
#question22 td.questiontext,
#question33 td.questiontext {
	padding-left: 65px;
}

Capture2.JPG
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 2 years 11 months ago by tpartner.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.241 seconds
Donation Image