Welcome to the LimeSurvey Community Forum

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

One-Click Vote

More
9 years 9 months ago #129127 by AlexMic
One-Click Vote was created by AlexMic
Hi there,
is ist possible to reduce the voting to only one click by the user?
E.g.: The Question is displayed: "How did you get here?"
Answers: "Bus", "Bike", "Car", "Plane", ...

By only clicking on the answer the vote should be done, an answer messages "Thanks for your vote" should be displayed for a predefined time. And afterwards the question should be displayed again.

Is this possible? Couldn't find any hint to that in this community.
Kind regards,
Alexander
The topic has been locked.
More
9 years 8 months ago #129139 by tpartner
Replied by tpartner on topic One-Click Vote
LimeSurvey is a survey tool, not a poll tool but I suppose you could do.it with JavaScript...

1) Clicking on the radio submits the survey:
Code:
<script type="text/javascript" charset="utf-8">    
  $(document).ready(function(){ 
    $('input.radio').on('click', function(e) {
      $('#movenextbtn, #movesubmitbtn').trigger('click');
    });
    });
</script>

2) After a timout, the end message redirects back to the survey:
Code:
<script type="text/javascript" charset="utf-8">    
  $(document).ready(function(){ 
    setTimeout(function () { // 3 second delay
      window.location = "https://path/to/my/survey";
    }, 3000);
    });
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose