- Posts: 11
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Slider question/ position reset button
- bierbier
- Topic Author
- Offline
- New Member
Less
More
2 years 5 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
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
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 967
- Thank you received: 220
2 years 5 months ago #221539
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Replied by tammo on topic Slider question/ position reset button
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Please Log in to join the conversation.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
2 years 5 months ago - 2 years 5 months ago #221578
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
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:
Sample survey attached:
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:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 2 years 5 months ago by tpartner.
The following user(s) said Thank You: clestrie
Please Log in to join the conversation.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13642
- Thank you received: 2491
2 years 5 months ago #221589
by DenisChenu
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.
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 ?
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 service on demand , plugin development .
I don't answer to private message.
Please Log in to join the conversation.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
2 years 5 months ago #221598
by tpartner
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.
Replied by tpartner on topic Slider question/ position reset button
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.No way to use only CSS here ?
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13642
- Thank you received: 2491
2 years 5 months ago - 2 years 5 months ago #221615
by DenisChenu
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.
Replied by DenisChenu on topic Slider question/ position reset button
With skelvanilla / 3.X
With console CSS editor
Not perfect but a start
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 service on demand , plugin development .
I don't answer to private message.
Last edit: 2 years 5 months ago by DenisChenu.
Please Log in to join the conversation.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13642
- Thank you received: 2491
2 years 5 months ago #221616
by DenisChenu
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.
Replied by DenisChenu on topic Slider question/ position reset button
With
The final issue is the margin-top:3em, must find an better solution maybe ?
I add it on new feature request in skel.
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 service on demand , plugin development .
I don't answer to private message.
Please Log in to join the conversation.
- clestrie
- Offline
- New Member
Less
More
- Posts: 1
- Thank you received: 0
1 year 10 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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
1 year 10 months ago #229545
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
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.
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.