Welcome to the LimeSurvey Community Forum

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

"Polar" Questions

  • surv4711
  • surv4711's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 8 months ago #163764 by surv4711
"Polar" Questions was created by surv4711
Hi,
I have a special question type, I call them "polar" and I don't know how to achive the result with Limesurvey. Can you give me an idea, how such a question can be created? See Attachment with two flavours of this question type.

Can I make this with css or do I need a new question type for this or plugin, or isn't possible, or ...?

Your answers are very much welcome and thank you for your time.

surv4711
The topic has been locked.
More
6 years 8 months ago #163768 by jelo
Replied by jelo on topic "Polar" Questions
What version of LimeSurvey is used?
I'm not aware of any feature or plugin to get this kind of question type.

Workarounds might be possible. But they are heavily depending on used version of LimeSurvey.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • surv4711
  • surv4711's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 8 months ago #163773 by surv4711
Replied by surv4711 on topic "Polar" Questions
Hi jelo
Thank you so much for this fast reply!
I just downloaded the newest version some days ago, I am free to use any suggested version.
A workaround would be welcome. The most important thing is to show the first and last answer option of the "valid" answer options. To hide the "middle" option labels is easy. And I need just one "don't know" answer option to start with. I tried some things with css and a custom css class, yet without success.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 8 months ago #163776 by holch
Replied by holch on topic "Polar" Questions
Naja, da die beiden Pole bei dir immer gleich sind, sehe ich jetzt keinen echten Unterschied zu den Matriz/Array-Type-Fragen. Einziger Unterschied: du hast für jede Unterfrage eine beschriftung in der Zeile, während die Matrix-Fragen normalerweise nur oben die Beschriftung haben.

Solltest du aber eigentlich unterschiedliche Beschriftungen pro Zeile haben wollen, schau dir mal den Link hier an:
www.limesurvey.org/manual/Question_type_-_Array

Runterscrollen bis "Semantic Differential".

Sorry, switched to German in my head when I saw the screenshot. Won't repeat this in English. Follow the link, go to "Semantic Differential".

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • surv4711
  • surv4711's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 8 months ago #163782 by surv4711
Replied by surv4711 on topic "Polar" Questions
Die Pole sind leider nicht immer gleich, mal heisst es «ja, sehr», mal heisst es «ja, absolut» mal «sehr zufrieden», gleiches auf der anderen Polseite.
Die Semantic Differential habe ich gesehen, war schon hoffnungsfroh, aber da fehlt doch die Frage, sofern ich das richtig erfasst habe. Die Pole sind da. Sollte ich damit probieren? Vielleicht die Frage an das erste Item anhängen und zB. mit div oder span abgrenzen und links ausrichten? Das könnte schwierig sein für einen mittelmässigen CSS Bastler wie mich, zumal die Fragen sicher 2-3 zeilig werden und alles vertikal schön mittig ausgerichtet sein sollte.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 8 months ago #163783 by holch
Replied by holch on topic "Polar" Questions
We should continue in English, because we are in the English Forum. Otherwise I would have to move this to the German forum, which would also be strange.

I thought that it was possible to seperate the question with an additional "|", but I tried and it didn't work. I thought it worked before.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • surv4711
  • surv4711's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 8 months ago #163784 by surv4711
Replied by surv4711 on topic "Polar" Questions
Thank you so much for your inquiry and your quick response.
Is it very difficult to implement a new question type? What I need seems to lie between array and Semantic Differential. I had a look, there are many places to change, php, js, css, and in the core files, that is probably no good idea? I'll come back tomorrow, maybe with new findings, o.k.?
The topic has been locked.
More
6 years 8 months ago #163787 by jelo
Replied by jelo on topic "Polar" Questions
Aren't the two items "Don't know" and "No answer" relevant? That looks not that easy to implement.
Currently there is no easy way to implenment custom questions. The groundwork has been done.

BTW: Never state "the latest version". Always post the exact version.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 8 months ago #163800 by Joffm
Replied by Joffm on topic "Polar" Questions
Hi,
out of the box you can get this:


Settings:
Advanced settings / Question width: 40%
Subquestions:
Question 1<div style="float: right;display:inline">left 1</div>|right 1
Answer options:
&nbsp; &nbsp;

Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • surv4711
  • surv4711's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 8 months ago #164034 by surv4711
Replied by surv4711 on topic "Polar" Questions
Hi Joffm, jelo, holch

First thank you all for the amazing and enthusiastic help. @Joffm: This was the path I have taken for my solution, it was obvious that some html was necessary. My fear was that an adminstrative would not be able to handle the HTML in the text. So I modified the code in do_array() to enable multiple pipe symbols as separators, keeping the $answertext and $answertextright variable in place:

$answertexts = explode('|', $answertext);
$answertext = (count($answertexts) > 0) ? $answertexts[0] : '';
$answertextright = '';
if (count($answertexts) > 2) {
$answertextright = $answertexts[2];
} elseif (count($answertexts) > 1) {
$answertextright = $answertexts[1];
}

Later in the code I nulled the cellwidth params and added some classes for separate formatting. It seemed to me not helpful to set the column width directly in the element. And the "question width" would have been applied to the right and left columns, I needed space on the left for longer questions. col.php, answer_row.php and answer.php I modified by removing the style=.. attribute, added some divs with new classes, extended the template and added custom css that works only, if the question has a 'question-polar' class. Still missing are the mobile settings. See attached the result.
This exercise gave me the chance to have a look at the code, a lot of work in it, chapeau. If I could take a wish, it would be some kind of plugin architecture that makes extending easier. I saw some concepts - e.g. the "one char unique question type code" that gave me an impression of the work that has to be done.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose