- Posts: 9
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Loading next page automatically upon selection of answer
- ReenaAyodheea
- Topic Author
- Offline
- New Member
Less
More
4 years 5 months ago #191139
by ReenaAyodheea
Loading next page automatically upon selection of answer was created 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
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.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10104
- Thank you received: 3593
4 years 5 months ago #191141
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Loading next page automatically upon selection of answer
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.
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.
- ReenaAyodheea
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
4 years 5 months ago #191142
by ReenaAyodheea
Replied by ReenaAyodheea on topic Loading next page automatically upon selection of answer
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
Thank you
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10104
- Thank you received: 3593
4 years 5 months ago - 4 years 5 months ago #191147
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Loading next page automatically upon selection of answer
If you have a single list-radio type question, disable AJAX in the survey theme options and add this script to the question source:
Sample survey attached:
Code:
<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:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 4 years 5 months ago by tpartner.
The topic has been locked.
- ReenaAyodheea
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
4 years 5 months ago #191149
by ReenaAyodheea
Replied by ReenaAyodheea on topic Loading next page automatically upon selection of answer
Hello,
Thank you, it works.
Regards,
Reena
Thank you, it works.
Regards,
Reena
The topic has been locked.
- ReenaAyodheea
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
4 years 5 months ago #191150
by ReenaAyodheea
Replied by ReenaAyodheea on topic Loading next page automatically upon selection of answer
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
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.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10104
- Thank you received: 3593
4 years 5 months ago #191211
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Loading next page automatically upon selection of answer
You can place this in your custom.js file:
Note that this will be applied to ALL list-radio questions in surveys using that theme (template).
Code:
$(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.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13633
- Thank you received: 2491
4 years 5 months ago #191301
by DenisChenu
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.
Replied by DenisChenu on topic Loading next page automatically upon selection of answer
Inpiration :
gitlab.com/SondagesPro/QuestionSettingsT...assets/autosubmit.js
must be updated to
1. 3.X version
2. Allow settings by question
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.