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) 3 years 6 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: 3 years 6 months ago by lovepade.
The administrator has disabled public write access.

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

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4358
  • Thank you received: 826
  • Karma: 381
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) 3 years 6 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) 3 years 6 months ago #61045

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4358
  • Thank you received: 826
  • Karma: 381
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: 3 years 6 months ago by tpartner.
The administrator has disabled public write access.

Re: array numbers with equals sum (or dual scale slider layout) 6 months 3 weeks ago #108045

  • srocky
  • srocky's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 11
  • Karma: 0
Hi there,

I know, that the last post for this topic has been written almost three years ago, but maybe there is someone who could give me some help.

I've prepared triple-question table according to above css code. The problem is, that I have to copy the whole table several times and put all of them one by one on this same screen. When I copy css code and raplace question IDs, the following tables were "stick" to previous one.

Is it possible to put several questions like this on one screen? If yes, how do I have to change syntax?

Greetings
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.991 seconds
Donation Image