Welcome, Guest
Username: Password: Remember me

TOPIC: Making Radio Button Question Submit onclick

Making Radio Button Question Submit onclick 2 years 5 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.

Re: Making Radio Button Question Submit onclick 2 years 5 months ago #78307

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6326
  • Thank you received: 815
  • Karma: 242
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
Last Edit: 2 years 5 months ago by DenisChenu.
The administrator has disabled public write access.

Re: Making Radio Button Question Submit onclick 2 years 5 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.

Re: Making Radio Button Question Submit onclick 2 years 5 months ago #78339

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6326
  • Thank you received: 815
  • Karma: 242
Remove ot from template.js and put it in group description.

Look at workarounds to see how add javascript to your survey.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.098 seconds
Donation Image