Welcome to the LimeSurvey Community Forum

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

Text label position (multiple numerical input question type)

  • Albinux
  • Albinux's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 10 months ago #178483 by Albinux
My apologies I didn't even say hello. "Hello! "There, it's done! :)
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 10 months ago #178491 by tpartner
Add something like this to your custom.js file:

Code:
$(document).on('ready pjax:scriptcomplete',function() {
 
  // Add/remove classes
  $('.slider-left, .slider-right').removeClass('col-sm-2 col-sm-4 col-sm-6 col-sm-8 col-sm-10 col-xs-6 col-xs-12 text-right text-left visible-xs-block');
  $('.slider-container').removeClass('col-sm-2 col-sm-4 col-sm-6 col-sm-8 col-sm-10');
  $('.slider-item').addClass('custom-text-location');
  $('.slider-left, .slider-right').addClass('slider-text');
 
  // Move slider left/right text
  $('.slider-item').each(function(i) {
    $('.slider-left', this).after($('.slider-right', this));
    $('.slider-right:gt(0)', this).remove();
  });
});

Add something like this to your custom.css file:

Code:
.slider-item.custom-text-location .slider-left {
  float: left;
  width: 20%;
  min-width: 100px;
  text-align: left;
}
 
.slider-item.custom-text-location .slider-text {
  width: 20%;
  min-width: 100px;
}
 
.slider-item.custom-text-location .slider-left {
  float: left;
  text-align: left;
}
 
.slider-item.custom-text-location .slider-right {
  float: right;
  text-align: right;
}
 
.slider-item.custom-text-location .slider-container {
  clear: both;
  margin-top: 3em;
}

Note: If you have FTP access to the server, you could bypass the JavaScript requirement by customizing the question layout directly in your survey theme.

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: DenisChenu, Albinux
The topic has been locked.
  • Albinux
  • Albinux's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 10 months ago #178492 by Albinux
Thank you! Unfortunately, it doesn't seem to work this time:

enquetes-sante-pro.univ-grenoble-alpes.f...x.php/796664?lang=en

The display remains the same as before....
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 10 months ago #178494 by tpartner
Err...yes it does.

Always completely clear the browser cache and refresh when testing.


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: Albinux
The topic has been locked.
  • Albinux
  • Albinux's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 10 months ago #178535 by Albinux
Indeed it works better that way, great!

enquetes-sante-pro.univ-grenoble-alpes.f...x.php/796664?lang=fr

I have three quick questions:
1) How to center the gauge under the text of the question (or "slider-track" I think; for the moment it is shifted to the right)?
2) How to center each portion of text ("Pas du tout d'accord" and "Tout à fait d'accord") above the gauge boundaries?
3) How to align these same portions of text in a centered way rather than "right aligned"?

In other words, having this:



A thousand thanks in advance!
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
5 years 10 months ago - 5 years 10 months ago #178557 by DenisChenu

Albinux wrote: …
3) How to align these same portions of text in a centered way rather than "right aligned"?

You can hide label part and set total with to 100% for slider part



Then , i think with tpartner workaround : you are really near of needed behaviour.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
Last edit: 5 years 10 months ago by DenisChenu.
The following user(s) said Thank You: Albinux
The topic has been locked.
  • Albinux
  • Albinux's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 10 months ago #178575 by Albinux
Yes indeed the desired result is getting closer, thank you! :)

enquetes-sante-pro.univ-grenoble-alpes.f...x.php/796664?lang=fr

I just managed to get my hands on a live example of the ideal result I would like:

enquete.cortecs.org/index.php/816422

This is the Limesurvey version 2.72.6+171207

In fact, ideally I would like to reproduce this same result with my current version (3.15.5+181115). More than 4000 respondents have already used the question as it was designed in the first version (before our IT departments changed version without warning...). I would like to be able to use a similar design to ensure maximum reliability.
The topic has been locked.
  • Albinux
  • Albinux's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 10 months ago #178690 by Albinux
Hello,

Thanks to your advice, I succeeded! Thank you both !

Unfortunately I have just restarted my investigation and some people contact me to tell me that 1) either the sliders don't appear or 2) or the sliders can't be moved:( Moreover, these problems are not encountered by everyone.

Do you have any idea what the problem is?

Here is a live example of the latest version of the question concerned:
enquetes-sante-pro.univ-grenoble-alpes.f...x.php/796664?lang=en

Huge thanks to whoever gets me out of this tricky situation…
The topic has been locked.
  • Albinux
  • Albinux's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 10 months ago #178694 by Albinux
Apparently the problem is not the added code. I just did the test with different supports and browsers: it worked everywhere except with internet explorer, both with a windows vista and with a windows 10. When I use a basic model (vanilla) without an added code, the problem persists.

The few exchanges I have with respondents who contact me to inform me of the problem seem to confirm that the problem comes from Internet Explorer.

Here is an picture showing the problematic display :
Attachments:
The topic has been locked.
  • Albinux
  • Albinux's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 10 months ago #178696 by Albinux
I just found this thread:

www.limesurvey.org/forum/design-issues/1...-internet-explorer-8

Does that mean that I have not any other options but to tell people to update or change their browsers?
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 10 months ago #178697 by holch
Ideally this would work on all browsers. But honestly, Internet Explorer 8 came out in 2009 on XP and Vista.
en.wikipedia.org/wiki/Internet_Explorer_8

9 years is a lot in terms of internet technology. No one should be on the internet with Internet Explorer 8.

Making sure that even ancient browsers like this one are still supported would tie up valuable resources, which I don't think is worth it.

In the last year the world wide share of Internet Explorer was below 4%:
gs.statcounter.com/browser-market-share

This is based on ALL Internet Explorer Versions. I would assume that IE8 is probably somewhere far below 1%.

Alternative: Use a less problematic question format. The slider (together with the ranking question) is probably the most sensitive question format when it comes to function and display.

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.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 10 months ago #178699 by tpartner
@holch, can you test in IE? I can reproduce the problem in IE10 and IE11.

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: DenisChenu
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose