Making Radio Button Question Submit onclick

More
5 years 2 months ago #78304 by FreedomTrip
FreedomTrip created the topic: Making Radio Button Question Submit onclick
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
5 years 2 months ago - 5 years 2 months ago #78307 by DenisChenu
DenisChenu replied the topic: Making Radio Button Question Submit onclick
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).
An error happen ? Before make a new topic : remind the Debug mode .
Last Edit: 5 years 2 months ago by DenisChenu.

Please Log in to join the conversation.

More
5 years 2 months ago #78333 by FreedomTrip
FreedomTrip replied the topic: Making Radio Button Question Submit onclick
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
5 years 2 months ago #78339 by DenisChenu
DenisChenu replied the topic: Making Radio Button Question Submit onclick
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).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now