Script: Disable NEXT Button Until Specific Radio Selected

You will be able to use custom Javascript/Css in radio questions.

NOTE: See the article: Adding JavaScript and/or CSS to your Question if you have not added JavaScript and/or CSS to a question


Disable the NEXT button until you select a specific Radio button

  1. Add the code below to the ADD JAVASCRIPT field
  2. Replace all (3) instances of Q26, with your radio question name
  3. Replace the "1" (line 9 below) with the response number that will allow you to pass
jQuery(function()
{
if (!jQuery(".cm-question[data-qnum=Q26] input:radio").is(":checked"))
{
cmSurvey.disableNextButton(true);
}
jQuery(".cm-question[data-qnum=Q26] input:radio").change(function()
{
if (jQuery(".cm-question[data-qnum=Q26] input:radio:checked").attr("data-name") == "1")
{
cmSurvey.disableNextButton(false);
}
else
{
cmSurvey.disableNextButton(true);
}
});
});

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.