- Posts: 17
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
restrict slider access
- equilibrium_21
- Topic Author
- Offline
- New Member
Less
More
1 year 10 months ago #228932
by equilibrium_21
restrict slider access was created by equilibrium_21
Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey hosting:
Survey theme/template:
==================
Hello forum,
in my survey, I've got a multiple numerical input question with two subquestions and I am using the slider layout. I want the participant to see the two subquestions in one page, but he/she must firstly answert the first question before being able to move the second slider. Does anybody have any advice? Thanks in advance.
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey hosting:
Survey theme/template:
==================
Hello forum,
in my survey, I've got a multiple numerical input question with two subquestions and I am using the slider layout. I want the participant to see the two subquestions in one page, but he/she must firstly answert the first question before being able to move the second slider. Does anybody have any advice? Thanks in advance.
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12921
- Thank you received: 3977
1 year 10 months ago #228933
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic restrict slider access
Why didn't you answer the initial questions?
Now my question:
How do you define " A slider is answered"?
You can only be sure if you use two separate questions.
Joffm
Now my question:
How do you define " A slider is answered"?
You can only be sure if you use two separate questions.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.
- equilibrium_21
- Topic Author
- Offline
- New Member
Less
More
- Posts: 17
- Thank you received: 0
1 year 10 months ago #228934
by equilibrium_21
Replied by equilibrium_21 on topic restrict slider access
Hello Jeff,
sorry for the vague description, by "A slider is answered" I mean that the participant has moved the slider (aka has put in a number
my problem more generally:
1. I'd like to show two questions in one screen
2. the participant sees both questions
3. the participant cannot answer the second question (put anything in) before having answered the first question
Is there any way to do so?
sorry for the vague description, by "A slider is answered" I mean that the participant has moved the slider (aka has put in a number
my problem more generally:
1. I'd like to show two questions in one screen
2. the participant sees both questions
3. the participant cannot answer the second question (put anything in) before having answered the first question
Is there any way to do so?
Please Log in to join the conversation.
- holch
- Away
- LimeSurvey Community Team
Less
More
- Posts: 11655
- Thank you received: 2742
1 year 10 months ago #228935
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic restrict slider access
And again you did not answer the initial questions, as Joffm asked you to:
Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey hosting:
Survey theme/template:
For your question the theme, the version and if it is selfhosted might be very important.
Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey hosting:
Survey theme/template:
For your question the theme, the version and if it is selfhosted might be very important.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Please Log in to join the conversation.
- equilibrium_21
- Topic Author
- Offline
- New Member
Less
More
- Posts: 17
- Thank you received: 0
1 year 10 months ago #228945
by equilibrium_21
Replied by equilibrium_21 on topic restrict slider access
Your LimeSurvey version: Version 5.3.16
Own server or LimeSurvey hosting: own server
Survey theme/template: vanilla
Own server or LimeSurvey hosting: own server
Survey theme/template: vanilla
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12921
- Thank you received: 3977
1 year 10 months ago #228947
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic restrict slider access
And again I ask "When is the first question answered?"
Let's imagine:
1.
The respondent moves the first slider.
Now he is able to move the second slider.
And the respondent moves the second slider.
He changes his opinion and changes the position of the first slider.
So it was more or less useless to lock the second slider.
2.
To avoid the above let's change the scenario a bit:
After the first slider is answered, the second slider gets unlocked, but the first slider gets locked.
The respondent moves the first slider.
Unintentionally he releases the mouse button before he reaches the final position (or he releases it, but would like to refine the position)
Now the first slider is locked and the respondent has no chance to set this slider to the desired position.
So, I do not see any sense in it.
But anyway:
Maybe you may try this
In the source code of the first slider question insert this
You see the pupose is to show the second slider if the first is moved.
And in the second slider question add the css class "slid2" and this script
This only hides the second slider at the beginning
Let's imagine:
1.
The respondent moves the first slider.
Now he is able to move the second slider.
And the respondent moves the second slider.
He changes his opinion and changes the position of the first slider.
So it was more or less useless to lock the second slider.
2.
To avoid the above let's change the scenario a bit:
After the first slider is answered, the second slider gets unlocked, but the first slider gets locked.
The respondent moves the first slider.
Unintentionally he releases the mouse button before he reaches the final position (or he releases it, but would like to refine the position)
Now the first slider is locked and the respondent has no chance to set this slider to the desired position.
So, I do not see any sense in it.
But anyway:
Maybe you may try this
In the source code of the first slider question insert this
Code:
<script type="text/javascript" data-author="Tony Partner"> $(document).on('ready pjax:scriptcomplete',function(){ // Identify elements var thisQuestion = $('#question{QID}'); var slid1 = $('.answer-item.slider-item:eq(0) input:text'); $(slid1).on('slideEnabled',function(){ // Listener on slider $(this).on('slide slideStop', function(event) { $('.slid2 .slider-container').show(); }); }); }); </script>
You see the pupose is to show the second slider if the first is moved.
And in the second slider question add the css class "slid2" and this script
Code:
<script type="text/javascript"> $(document).on('ready pjax:scriptcomplete',function(){ $('.slid2 .slider-container').hide(); }); </script>
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.