Welcome to the LimeSurvey Community Forum

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

Automatically change to new question: Bootstrap Buttons

  • SimonPressler
  • SimonPressler's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 9 months ago #242392 by SimonPressler
Please help us help you and fill where relevant:
Your LimeSurvey version: 5.6.14
Own server or LimeSurvey hosting: server
Survey theme/template: fruity
==================
Hey,
i would like my survey to automatically switch to the next question once an answer is selected. This seems possible with radio inputs, but past threads did not provide an answer on how to do this with bootstrap buttons ( forums.limesurvey.org/index.php/forum/ca...ting-answer?start=36 ). Since these questions are over two years old, I wanted to ask if this is possible now.
Best regards
Simon

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 9 months ago #242397 by tpartner
This script placed in the source of a bootstrap buttons question will advance to the next page when a button is clicked:

Code:
<script type="text/javascript" data-author="Tony Partner">
 
  $(document).on('ready pjax:scriptcomplete',function(){
 
    $('#question{QID} :radio').on('change', function(e) {
      $('#ls-button-submit').trigger('click');
    });
  });
</script>

Sample survey attached:  

File Attachment:

File Name: limesurvey...13-2.lss
File Size:41 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

  • SimonPressler
  • SimonPressler's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 9 months ago #242398 by SimonPressler
Awesome! Thank you so much!

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose