Check out the LimeSurvey source code on GitHub!

Making Radio Button Question Submit onclick

More
4 years 10 months ago #78304 by FreedomTrip
I have a fairly large survey consisting of mostly single choice questions in the radio button format.

Is there any way to make the survey submit right when a user clicks on one of the radio buttons? I have 1 question per page, and I would like to have the form automatically move onto the next page when a user clicks once on an option.

Please Log in to join the conversation.

More
4 years 10 months ago - 4 years 10 months ago #78307 by DenisChenu
Hello,

It's only radio button ?

If yes:
$(document).ready(function(){
  $("#limesurvey input[type=radio]").click(function(){
    $("#movenextbtn,#movesubmitbtn").click();
  });
});
In your template.js for example.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
Last Edit: 4 years 10 months ago by DenisChenu.

Please Log in to join the conversation.

More
4 years 10 months ago #78333 by FreedomTrip
So close! The 50 main questions in my survey work like they should. But there are two or three groups of questions in addition to these, that I can't have acting the same way. How would I make sure these don't submit on click?

Please Log in to join the conversation.

More
4 years 10 months ago #78339 by DenisChenu
Remove ot from template.js and put it in group description.

Look at workarounds to see how add javascript to your survey.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form