Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Making Radio Button Question Submit onclick

Making Radio Button Question Submit onclick 4 years 3 months ago #78304

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.
The administrator has disabled public write access.

Making Radio Button Question Submit onclick 4 years 3 months ago #78307

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9293
  • Thank you received: 1327
  • Karma: 384
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 developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
Last Edit: 4 years 3 months ago by DenisChenu.
The administrator has disabled public write access.

Making Radio Button Question Submit onclick 4 years 3 months ago #78333

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?
The administrator has disabled public write access.

Making Radio Button Question Submit onclick 4 years 3 months ago #78339

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9293
  • Thank you received: 1327
  • Karma: 384
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 developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.264 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form