Welcome to the LimeSurvey Community Forum

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

Slider question/ position reset button

  • bierbier
  • bierbier's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 2 months ago #221522 by bierbier
Slider question/ position reset button was created by bierbier
hey,
I'm trying to move the reset button in a Slider question right now. Unfortunately I have no success.
Does anyone have experience with this and can help me further? (LimeSurvey Version 5/ Fruity theme extension)

Many thanks in advance
Attachments:

Please Log in to join the conversation.

  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
3 years 2 months ago #221539 by tammo
Replied by tammo on topic Slider question/ position reset button
This is obviously a bug in the template. Please report this via bugs.limesurvey.org

Tammo


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 months ago - 3 years 2 months ago #221578 by tpartner
Replied by tpartner on topic Slider question/ position reset button
My preference would be to have the reset button below the slider so it doesn't interfere with the labels.

You can modify the core question view in your custom survey theme,  create a custom question theme or simply add a script like this to the question source:
 
 
Code:
<script type="text/javascript" data-author="Tony Partner">  
  $(document).on('ready pjax:scriptcomplete',function(){     
 
    $('#question{QID} .slider-item').each(function(i) { 
 
      $('.ls-input-group-reset', this).appendTo($('> div:eq(0)', this)).css({
        'display': 'block',
        'clear': 'both',
        'text-align': 'center',
        'padding-top': '10px',
        'width': 'auto'
      }); 
 
      $('.ls-input-group-reset button', this).css({
        'top': 'auto'
      });
    });
    });
</script>

 

Sample survey attached: 

File Attachment:

File Name: limesurvey...9374.lss
File Size:35 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 3 years 2 months ago by tpartner.
The following user(s) said Thank You: clestrie

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 2 months ago #221589 by DenisChenu
Replied by DenisChenu on topic Slider question/ position reset button
> My preference would be to have the reset button below the slider so it doesn't interfere with the labels.

No way to use only CSS here ?
The button are inside is own div ? no ?

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.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 months ago #221598 by tpartner
Replied by tpartner on topic Slider question/ position reset button

No way to use only CSS here ?

The button container is inside the slider wrapper. I suppose you could position the button wrapper absolutely but I prefer to move it to clear the labels, which are outside of the slider wrapper.

This is why I suggested that customizing the view is an alternative - moving the button wrapper and removing some dumb classes and styles.

Cheers,
Tony Partner

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

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 2 months ago - 3 years 2 months ago #221615 by DenisChenu
Replied by DenisChenu on topic Slider question/ position reset button
With skelvanilla / 3.X
Code:
.ls-input-group-extra {
    /* width: 1%; */
    /* white-space: nowrap; */
    /* vertical-align: middle; */
    /* display: table-cell; */
    /* padding: 0.6rem 1.2rem; */
    /* line-height: 1; */
    display: block;
    margin-top: 3em;
    margin-left: 50%;
}

With console CSS editor
Not perfect but a start

 

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: 3 years 2 months ago by DenisChenu.

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 2 months ago #221616 by DenisChenu
Replied by DenisChenu on topic Slider question/ position reset button
With
Code:
.ls-input-group-reset .btn-slider-reset{left:-25%}


 

The final issue is the margin-top:3em, must find an better solution maybe ?

I add it on new feature request in skel.

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.

Please Log in to join the conversation.

More
2 years 6 months ago #229544 by clestrie
Replied by clestrie on topic Slider question/ position reset button
This solution works very well! With my survey I have to rename the button and I am biting my teeth at the solution. Is this possible and if so, how?

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 6 months ago #229545 by tpartner
Replied by tpartner on topic Slider question/ position reset button
Please open new topics for new problems.

Place a script like this in the source of the question.

Code:
<script type="text/javascript" data-author="Tony Partner">  
 
  $(document).ready(function() {
    $('#question{QID} .ls-input-group-reset .btn-slider-reset').text('My button text');
  )};
</script>

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: clestrie, gressi

Please Log in to join the conversation.

  • jan.philipp.thomeczek
  • jan.philipp.thomeczek's Avatar
  • Offline
  • Junior Member
  • Junior Member
More
4 months 3 weeks ago #266398 by jan.philipp.thomeczek
Replied by jan.philipp.thomeczek on topic Slider question/ position reset button
Sorry to dig up this old reply... I just tried to do that with the fruity twenthree theme - it doesn't work, I suspect because the button doesn't contain text anymore but is an image now. Any way I can override this image with the text?

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 months 3 weeks ago #266403 by Joffm
Replied by Joffm on topic Slider question/ position reset button
Hi,
you may change the content.

.ri-arrow-go-back-line::before {
  content: "\ea58";
  content: "Reset me";
}
 

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: jan.philipp.thomeczek

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose