Welcome to the LimeSurvey Community Forum

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

ipad/iphone and ranking question

  • rvenkat
  • rvenkat's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 years 10 months ago #79613 by rvenkat
ipad/iphone and ranking question was created by rvenkat
I did everything described in the two workarounds for enabling ranking questions with drag and drop. I also put jquery.ui.touch-punch.js in the template folder.

When I test the survey on my computer, I can double-click to move an item from the "choice" column to the "ranking" column, but I am not able to drag and drop. I can drag an item, but it doesn't stay in the raking column.

On my iphone I can drag, but the item won't stay in the "ranking" column when I drop. It moves back to "choice" column. I can reorder items within the choice column.

In the test survey I have 3 items that need to be ranked, so I put max and min answers as 3 in the advanced settings.

My ranking column doesn't have any boxes or cells to drag and drop.

What am I missing here?



Ramesh
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
11 years 10 months ago #79614 by Mazi
Replied by Mazi on topic ipad/iphone and ranking question
1. Which Limesurvey version do you use?

2. Can you post a link to an activated sample survey?

3. Please post the link to the workaround you mentioned as well.

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
  • rvenkat
  • rvenkat's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 years 10 months ago #79621 by rvenkat
I am using version 1.92+ build 120418 (I updated today before testing ranking on ipad/iphone).

The sample survey is here .

The workarounds I used are this one (for 1.90 or newer) and this one (for 1.91 or newer).

Thanks.


Ramesh
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 10 months ago #79639 by tpartner
You have added the wrong styles to template.css.

Remove this:
Code:
/* Drag-n-drop for ranking images */
 
#question11 .dragDropTable {
    width: auto;
}
 
#question11 .dragDropTable .dragDropChoiceList, 
#question11 .dragDropTable .dragDropRankList {
    min-height: 60px;
    _height: 60px; /* IE6 and below hack */
  width: auto;
    min-width: 60px;
    _width: 60px; /* IE6 and below hack */
}
 
#question11 .dragDropTable li {
  background: 0 none;
  border: 0 none;
    height: 50px;
    width: 50px;
}
 
#question11 .dragDropTable li img {
    margin: 0;
    padding: 0;
  border: 0 none;
}

And add this:
Code:
/* Drag-n-drop ranking styles */
 
.dragDropTable {
  border: 0 none;
  border-collapse: collapse;
  width: 100%;
}
 
.dragDropTable td {
  vertical-align: top;
  width: 50%;
  padding-right: 20px;
}
 
.dragDropTable .dragDropHeader {
  font-weight: bold;
}
 
.dragDropTable .dragDropChoices,
.dragDropTable .dragDropRanks {
  margin: 5px 0 0 0; 
  background: transparent none;
  border: 0 none;
}
 
.dragDropTable .dragDropChoiceList,
.dragDropTable .dragDropRankList {
  float: left;
  width: 100%;
  min-height: 2.4em;
  _height: 2.4em; /* IE6 and below hack */
    margin: 0;
    padding: 0;
    list-style-type: none;
  background: #FBFBFB none;
  border: 1px solid #CCCCCC;
}
 
.dragDropTable .dragDropChoiceList li,
.dragDropTable .dragDropRankList li {
    margin: 3px;
    *margin-left: -13px; /* IE7 and below */
    padding: 3px;
  min-height: 1.3em;
  _height: 1.3em; /* IE6 and below hack */
  font-weight: normal;
  cursor: move;
  display: block; /* Force the li to full width */
}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • rvenkat
  • rvenkat's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 years 10 months ago #79669 by rvenkat
Thanks very much Tony.
It works well.

Only catch is that it cannot be a mandatory question.

If I have 6 or more choices, but want people to give me only their top 5 ranks, then the question has to be non-mandatory.

If it is mandatory and I set min and max answers to 5, then it won't allow me to proceed further because it is looking for all choices to be ranked. But the ranking column has only 5 spaces.

For the survey I am doing now, I made this a non-mandatory question. But if there's a way to make it mandatory and have a ranking list that is shorter than the choice list, it would be very useful. It's hard for people to rank a very long list of items.

Thank you again for your help.


Ramesh
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 10 months ago #79670 by tpartner
I think you can set a minimum answers for non-mandatory questions.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
11 years 7 months ago #84265 by Mazi

tpartner wrote: I think you can set a minimum answers for non-mandatory questions.

Ramesh, did you test how it works when setting min/max answers?

There have also been some changes on how the Expression Manager handles min/max answer settings so it should be possible to make the question mandatory and define min/max answers.

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
More
5 years 8 months ago #171136 by s2940523
Replied by s2940523 on topic iPhone / touch devices and ranking question
Hello there,

I am trying to develop a ranking question where the responses can be dragged & dropped into boxes with rank order numbers 1 / 2 / 3 / 4 / 5. The basic drop and drag works on a PC, but would not work with a touch screen (iPhone, iPad). Is there any way how to fix this, please? I have only started my limesurvey online in the mid of June 2018, so I am assuming I have the latest version. Thank you.

viewsonthreats.limequery.com/survey/inde...16291/gid/20/qid/237
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 8 months ago #171140 by DenisChenu
Replied by DenisChenu on topic iPhone / touch devices and ranking question

s2940523 wrote: Hello there,

Why answer to a 6 years old topic …

s2940523 wrote: I am trying to develop a ranking question where the responses can be dragged & dropped into boxes with rank order numbers 1 / 2 / 3 / 4 / 5. The basic drop and drag works on a PC, but would not work with a touch screen (iPhone, iPad). Is there any way how to fix this, please?

I think it work before (and hardly tested).
Maybe time to make a bug report.

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.
More
5 years 8 months ago #171142 by s2940523
Replied by s2940523 on topic iPhone / touch devices and ranking question
Thanks .... it's maybe the highest time to do something about this since it is still an issue 6 years from being first discussed ... :(
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 8 months ago #171150 by Joffm

Thanks .... it's maybe the highest time to do something about this since it is still an issue 6 years from being first discussed ...


You forget that this thread was about a quite different version of Limesurvey (1.92)
In the meantime there were versions 2.05/2.06, 2.50-2.73, and now 3.x

So Denis was right asking, why you answer to this six years old thread.

I just tried:
Version 3.13.2+180709
OS: Android
Device: Smartphone and Tablet

and didn't see any problems.

So it seems to be related to Apple devices.

And one last question: What exactly means "does not work"?
The question is displayed correctly, but you re not able do drag?

Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 8 months ago - 5 years 8 months ago #171167 by tpartner
Replied by tpartner on topic iPhone / touch devices and ranking question
I can confirm that the ranking question is broken in touch devices in LimeSurvey version 3.13.2 .

If the page content is larger than the viewport (page can be scrolled vertically), when trying to drag the ranking items vertically, the page scrolls instead of the item moving.

This is a regression since the jQuery UI Sortable plugin (used in 2.7x) was replaced with another plugin.

Tested on iPhone, Android devices.

@s2940523, please file a bug report.

Cheers,
Tony Partner

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

Lime-years ahead

Online-surveys for every purse and purpose