Automatically proceed to next question after selecting answer

More
2 weeks 6 days ago #160914 by tomtom
tomtom replied the topic: Automatically proceed to next question after selecting answer
Hi Tony. Thank you for your great jobs. I can apply it on each raido question now. But I would like to set a "YES/NO" question for participant who will go next page if only press "NO", since they will dropdown another ordinal question for "YES" answer. Thank you.

Please Log in to join the conversation.

More
2 weeks 6 days ago #160921 by Joffm
Joffm replied the topic: Automatically proceed to next question after selecting answer
Hi, tomtom,

why don't you place the dropdown on the next page which is only displayed if the respondent clicked "Yes"?

Of course, the easy way.

Joffm

Please Log in to join the conversation.

More
2 weeks 6 days ago #160924 by tomtom
tomtom replied the topic: Automatically proceed to next question after selecting answer
Hello Joffm, thank you for your suggestion. Please refer to my attachments, there are two mandatory questions( 1 and 1.1).
Now I only can use the suggested code in question 1.1 to auto next. Sorry that I cannot how to describe, since if I add the code on both 1 and 1.1, the survey would pop up a mandatory problem while selecting the likert question. Please correct me, thank you so much.
Attachments:

Please Log in to join the conversation.

More
2 weeks 6 days ago #160930 by Joffm
Joffm replied the topic: Automatically proceed to next question after selecting answer
Well,
if you think it to be absolutely necessary that the two questions appear on the same page it doesn't work.
But otherwise you can use the "normal" solution.

See attached sample.

File Attachment:

File Name: limesurvey...6579.lss
File Size:18 KB

Best regards
Joffm
Attachments:
The following user(s) said Thank You: tomtom

Please Log in to join the conversation.

More
2 weeks 6 days ago #160935 by tpartner
tpartner replied the topic: Automatically proceed to next question after selecting answer
If you want both questions on the same page and only the first radio of the first question triggers the submit, place this script in the source of the first question:

<script type="text/javascript" charset="utf-8">
	$(document).ready(function(){
 
		$('#question{QID} .answer-item:eq(0) input.radio:eq(0)').click(function() {
			checkconditions($(this).attr('value'), $(this).attr('name'), $(this).attr('type'));
			$('#movenextbtn, #movesubmitbtn').trigger('click');
		});
 
		$('#question{QID} .answer-item:eq(0) .label-clickable').unbind();
		$('#question{QID} .answer-item:eq(0) .label-clickable').click(function() {
			$('#question{QID} .answer-item:eq(0) input.radio').unbind();
			var input = $(this).parent().find('input.radio');
			$(input).trigger('click');
			checkconditions($(input).attr('value'), $(input).attr('name'), $(input).attr('type'));
			$('#movenextbtn, #movesubmitbtn').trigger('click');
		});
	});	
</script>

Sample survey attached:

File Attachment:

File Name: limesurvey...1-23.lss
File Size:16 KB

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The following user(s) said Thank You: tomtom

Please Log in to join the conversation.

More
2 weeks 5 days ago #160964 by tomtom
tomtom replied the topic: Automatically proceed to next question after selecting answer
Hi Joffm and Tony. Thank you for your kindness, it is exactly what I want! If participant say NO, they will be auto passed to next, so for YES answers, participant should spend more time on thinking the likert scale answers. Great!!!

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!