Conditions don't stop from advancing

More
5 years 1 month ago #73979 by aaron13
I'm trying to make a survey that requires users to select a certain answer before moving forward. My conditions seem to only slightly work.

With my multiple choice question, if you select the correct choices, the conditions will kick in and present more questions.

If you select the wrong question, you'll never see the additional questions.

The problem is if you select the wrong answers, you can just hit next and move forward, skipping a number of questions that I'd like to get presented.

I've tried to disable the next button, but can't seem to figure it out. Can someone give more advice on how to get this to work right?

I'm using Version 1.91+ Build 12170

Please Log in to join the conversation.

More
5 years 1 month ago #73986 by holch
I am not quite sure what you exactly mean. Either you want them to skip the questions, when they didn't mark the right questions, or you want them to get kicked out of the survey.

Maybe you can explain a little more or give a real (simple) example.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
5 years 1 month ago #73995 by Mazi
Maybe you can also solve your problem by using quotas?

When using conditions, please explain everything in more detail and also attach your survey so we can have a look.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 1 month ago #74060 by aaron13
I've attached the survey.

On the third page, there is a question "have you scheduled your physical". We want our guards to choose yes. With how the conditions are setup, if you choose yes, you are presented with more questions that must be answered.

Right now, if you choose no, you can still move forward with the survey.

I'd like the no to be a dead end, so that if you select no, you can't go any further.

The same thing happens again on page 4 and I believe 6. With six being the bigger issue. We want the guards to select only "Contra Loma, Cull Canyon, Shadow and Temescal" If that combo is chosen, another question is presented. If it isn't chosen, I'd like it to stop until that combo is chosen.

Can I do this with limesurvey?
Attachments:

Please Log in to join the conversation.

More
5 years 1 month ago #74063 by TMSWhite
I'd add a question on the page asking whether they had the physical. If they say No, have the question appear, and say something like "You must get a physical before you can continue with this survey" (or whatever you need it to say). Make that question mandatory, and set the validation criteria such that it can never be answered (e.g. make a numeric input, and set the Validation regular expression to "/I had a physical/"). Once they say Yes that they had a physical, that question would disappear, and they could proceed with the survey.

Please Log in to join the conversation.

More
5 years 1 month ago - 5 years 1 month ago #74064 by holch
It should be quite simple. Either you create a quota for "no" that is zero, if the questionnaire should be completely finished. So when someone answers "no" the quota is checked by limesurvey and the questionnaire will be closed, because the quota is always full.

If you just want to skip some later questions but they should for example answer some questions at the end or see an end-page, then you need to apply a condition to every following question which should not be shown in case they answer no.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
Last Edit: 5 years 1 month ago by holch.

Please Log in to join the conversation.

More
5 years 1 month ago #74066 by aaron13
Looking into what quotas do, I don't think I want it to end the survey, I just want it to be a locked door that doesn't let them progress until they answer correctly.

The validation might be a better choice in this instance, although I'm not exactly sure how to set that up.

Also, in the questions where they have to select only the 4 specific locations, I'm not sure the validation will work there. Will it?

Please Log in to join the conversation.

More
5 years 1 month ago #74088 by Mazi

aaron13 wrote: Looking into what quotas do, I don't think I want it to end the survey, I just want it to be a locked door that doesn't let them progress until they answer correctly.

In this case you can use some customized Javascript which is called when clicking next and shows a pop up as long as the correct answer wasn't chosen.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 1 month ago #74133 by tpartner
You could use javaScript to disable the Next/Submit button until the question is answered as required. You can put some text in the question indicating that it must be answered "Yes" to continue with the survey.

So in group 3...

1) Set up your survey to use JavaScript .

2) Add the following script to the source of the yes-no question.

The script initially checks if the yes-no is answered and sets the "disabled" attribute of the "Next" button accordingly. It also puts a listener on the yes-no radios to toggle the "disabled" attribute of the "Next" button.
<script type="text/javascript" charset="utf-8">
 
	$(document).ready(function() { 
 
		// Set the initial state of the "Next" button
		if($('.yes-no input.radio[value="Y"]').attr('checked') != true) {
			$('#movenextbtn').attr('disabled', true);
		}
 
		// A listener on the Yes-No radios to toggle the disabled attribute of the "Next" button
		$('.yes-no input.radio').click(function(){
			if($(this).attr('value') == 'Y') {
				$('#movenextbtn').attr('disabled', false);
			}
			else {
				$('#movenextbtn').attr('disabled', true);
			}
		});
    });
 
</script>

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.