Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Automatically proceed to next question after selecting answer

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 6 months ago #175438 by tpartner

Can this be used in Arrays?

Can what be used? There are many script samples in this thread.

But this code hides all next, can you hide only one problem page's next?

Please explain exactly what you want to do and what you have tried.

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
5 years 6 months ago #175649 by surveySn


Can this type be used?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 6 months ago #175650 by tpartner
That does not answer my questions.

What exactly are you trying to do?

What LimeSurvey version are you using?

What have you tried?

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
4 years 1 month ago - 4 years 1 month ago #195851 by matanzino
I am using LimeSurvey 3.22.10 (200323).
I am displaying all questions on a single page and would like to automatically proceed to the next question (for all questions).
I added your snippet for list-radio questions into the custom.js file of my current theme but it did not have any effect.
I also tried putting it directly into the source of a corresponding question - no effect either.
Any idea what I might be doing wrong?
(I checked that javascript is activated.)
Last edit: 4 years 1 month ago by matanzino.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 month ago #195853 by tpartner
Code:
I am displaying all questions on a single page and would like to automatically proceed to the next question
How can you proceed to a "next question" if they are already all displayed on the page?

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
4 years 1 month ago #195855 by matanzino
I am sorry, I meant to write "each question on a single page".
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 month ago #195856 by Joffm
Hi,

I added your snippet for list-radio questions

You used the correct snippet to insert into "custom.js"?
Code:
$(document).on('ready pjax:scriptcomplete',function(){ 
  $('.list-radio input[type="radio"]').on('click', function() {
    $('#ls-button-submit').trigger('click');
  });
});

Any idea what I might be doing wrong?

No. We cannot see what you are doing, unless we see at least your lss export.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
More
4 years 1 month ago #195862 by matanzino
My custom.js looks like this
Code:
/******************
    User custom JS
    ---------------
 
   Put JS-functions for your template here.
   If possible use a closure, or add them to the general Template Object "Template"
*/
 
$(document).on('ready pjax:scriptcomplete',function(){ 
    /**
     * Code included inside this will only run once the page Document Object Model (DOM) is ready for JavaScript code to execute
     * @see https://learn.jquery.com/using-jquery-core/document-ready/
     */
  $('.list-radio input[type="radio"]').on('click', function() {
    $('#ls-button-submit').trigger('click');
  });
});
 

And I attached the lss I am using.
Thank you very much for any help.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 month ago #195871 by tpartner
I tested and the code works perfectly for list-radio questions in that survey. Something else in your theme may be introducing JavaScript errors.

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
4 years 1 month ago - 4 years 1 month ago #195889 by matanzino
I tried it with a fresh template again, and now it works for me as well.
The only thing I changed in the other template was to replace the favicon.ico and the logo.png files with custom ones (in the template editor, which was the approach I still new from earlier versions).
Now I uploaded the custom brand logo using the theme options within the questionnaire settings and it still works.
Thanks a lot for the feedback!!
Last edit: 4 years 1 month ago by matanzino.
The topic has been locked.
More
3 years 7 months ago #205193 by haroldrio
Hello there, anyone care to help please.

So I tried this code on a radio list question on limesurvey 3.2 presented as one question per page.

However, I changed the theme question to bootstrap buttons and it did not work anymore.

I tried changing the radio (in red) to bootstrap-buttons and still did not work.


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

thank you
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 3 weeks ago #214580 by holch
In the question text of Q1.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose