Loading next page automatically upon selection of answer

More
2 years 3 weeks 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
The topic has been locked.
More
2 years 3 weeks 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.
The topic has been locked.
More
2 years 3 weeks 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
The topic has been locked.
More
2 years 3 weeks ago - 2 years 3 weeks 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.
Attachments:
Last edit: 2 years 3 weeks ago by tpartner.
The topic has been locked.
More
2 years 3 weeks ago #191149 by ReenaAyodheea
Hello,

Thank you, it works.

Regards,

Reena
The topic has been locked.
More
2 years 3 weeks 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
The topic has been locked.
More
2 years 3 weeks 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.
The topic has been locked.
More
2 years 2 weeks 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 . I don't answer to private message.
The topic has been locked.

Start now!

Just create your account and start using Limesurvey today.

Register now