Loading next page automatically upon selection of answer

More
3 weeks 5 days ago #191139 by ReenaAyodheea
Hello,

Is it possible to move to next page only after selecting answer but without clicking on next button ?
Anyone can help ?

Thank you

Regards,
Reena

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
3 weeks 5 days ago #191141 by tpartner
Yes it possible - there are many examples on the forums depending on question types.

That said, I don't think it's a good idea as it doesn't allow respondents to fix click mistakes.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Please Log in or Create an account to join the conversation.

More
3 weeks 5 days ago #191142 by ReenaAyodheea
I wanted to do it for whole survey basically for single answer question. Can you help ? could not find anything similar or could be I did not search using appropriate terms. Please note I am new to Javascripting

Thank you

Please Log in or Create an account to join the conversation.

More
3 weeks 5 days ago - 3 weeks 5 days ago #191147 by tpartner
If you have a single list-radio type question, disable AJAX in the survey theme options and add this script to the question source:

<script type="text/javascript" charset="utf-8">
	$(document).on('ready pjax:scriptcomplete',function(){
 
		$('#question{QID} input:radio[id^="answer"]').on('click', function(e) {
			$('#ls-button-submit').trigger('click');
		});
	});
</script>

Sample survey attached:

File Attachment:

File Name: limesurvey...714n.lss
File Size:17 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Attachments:
Last edit: 3 weeks 5 days ago by tpartner.

Please Log in or Create an account to join the conversation.

More
3 weeks 4 days ago #191149 by ReenaAyodheea
Hello,

Thank you, it works.

Regards,

Reena

Please Log in or Create an account to join the conversation.

More
3 weeks 4 days ago #191150 by ReenaAyodheea
Hello,

This has to be done for every list radio button question. It cannot be done once in a template or it should be added for each single question ?

Thank you

Please Log in or Create an account to join the conversation.

More
3 weeks 3 days ago #191211 by tpartner
You can place this in your custom.js file:

$(document).on('ready pjax:scriptcomplete',function(){
 
	$('.list-radio input:radio[id^="answer"]').on('click', function(e) {
		$('#ls-button-submit').trigger('click');
	});
});

Note that this will be applied to ALL list-radio questions in surveys using that theme (template).

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Please Log in or Create an account to join the conversation.

More
3 weeks 3 hours ago #191301 by DenisChenu
Inpiration : gitlab.com/SondagesPro/QuestionSettingsT...assets/autosubmit.js

must be updated to
1. 3.X version
2. Allow settings by question

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 .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!