Script: Complex Grid > Radio Row - Auto Submit Page Once All Rows Answered

This article will help you add code to Complex Grid - Radio Row that will auto submit the page once all rows on the screen have been answered


Background

There are some instances in which you have a Complex Grid - Radio Rows and you want to have the next page auto-submit once all the rows on the screen have been answered. 


Instructions

  1. Program your Complex Grid - Radio Row
  2. Add the following code to the 'ADD JAVASCRIPT' field
    • See article: Adding JavaScript and/or CSS to a Question
      var $ = jQuery;
      
      $("input").on("change",function() {
        // This assumes we have a row for the column text
        var $totalRequiredResponses = $(".cm-grid-response-set").find("tr").not(".cm-hidden").length-1;
        if ( $("tr").not(".cm-hidden").find("input:checked").length == $totalRequiredResponses ) {
         $("#cm-NextButton").click();
        }
      });
      		
  3. As always, remember to test

Please Note:

  • This code works if you are: 
    • Using RADIO ROWS ONLY
    • Showing ALL items on one screen
    • Using the 'Split Grid' feature to display across X Pages or X Rows
    • Filtering the response list
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.