Welcome to the LimeSurvey Community Forum

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

Automaticly next question when clicked answer

  • ElHeso
  • ElHeso's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 5 months ago #231512 by ElHeso
Please help us help you and fill where relevant:
Your LimeSurvey version: 2.05+ Build 141003
Own server or LimeSurvey hosting: Own
Survey theme/template:
==================
Hi i had some scripts that was working with limesurvey 5 etc so when yes/no question is answered it autmaticlly go to next question same for radio button questions.
but now when i try the scripts for this version nothing happens, i have put no on xss filter is there anything more i need to do?
this is the scripta i got from Tony Partner earlier for newer version
Radio button

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

Yes/no

<script type="text/javascript" <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>

 

Please Log in to join the conversation.

More
2 years 5 months ago #231513 by jelo

but now when i try the scripts for this version nothing happens, i have put no on xss filter is there anything more i need to do?
 
You cannot use most of the workarounds here in LimeSurvey 2.X.
The workarounds theses days are for LS3 or LS5.
LimeSurvey 2.05+ uses a complete different template engine.
BTW: LimeSurvey 2.05+ Build 141003 is no longer in support. No security  updates, no bugfixes.
 

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in to join the conversation.

  • ElHeso
  • ElHeso's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 5 months ago #231514 by ElHeso
Ok, so in limesurvey 2.05 you cant use scripts for making this work correct?

Please Log in to join the conversation.

More
2 years 5 months ago #231515 by jelo

Ok, so in limesurvey 2.05 you cant use scripts for making this work correct?
 
You need to look out for scripts that are made for LS 2.X. These are rare, cause these LimeSurvey versions are no longer maintained or offered here.
I won't have nor provide workarounds for LS 2.X anymore. But perhaps you have luck and someone has the workaround at hand.

 

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in to join the conversation.

  • ElHeso
  • ElHeso's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 5 months ago #231516 by ElHeso
ok, thanks i try to search

Please Log in to join the conversation.

  • ElHeso
  • ElHeso's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 5 months ago #231517 by ElHeso
Hi i got it to work with this code

<script type="text/javascript" charset="utf-8">
$(document).ready(function(){

$('#question{QID} input.radio').click(function() {
checkconditions($(this).attr('value'), $(this).attr('name'), $(this).attr('type'))
$('#movenextbtn, #movesubmitbtn').trigger('click');
});
});
</script>

so my question is there a way so i only need to put the code 1 time per survey and it uses it on all questions?
as i got it working now is that i paste it into each question so good if i can example put it in template or something so i dont need to put the code on each question

Please Log in to join the conversation.

  • ElHeso
  • ElHeso's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 5 months ago #231519 by ElHeso
I figured it out i added the code into question.pstpl and works like a charm

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 5 months ago #231520 by tpartner
Replied by tpartner on topic Automaticly next question when clicked answer
It begs the question - why are you using an 8 year old version that may have security issues?

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.

  • ElHeso
  • ElHeso's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 5 months ago #231521 by ElHeso
it´s beacuse it is heavily modified inside and i have not made the functions for new version of limesurvey so when the functions is made i will move into the new version

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose