Script: Simple Grid - Repeat Headers With Group Labels

This article will show you how to repeat the column headers along with the group labels in a Simple Grid


Background

If you have a Simple Grid with a number of 'Response Groups', you may want to repeat the column headers along with them. This article will show you how to do so.  


Instructions

  1. Program your 'Simple Grid - Horizontal Radio' question
    1. See article: Standard Question: Grid
  2. Add the following to the '+ Javascript' field
    1. See article: Adding JavaScript and/or CSS to a Question
    2. No need to update anything. Just copy and paste this in.
      var $ = jQuery;
      
      $headers = $(".cm-simple-grid").find("table").find("tr").eq(0).detach().clone();
      $groupTr = $(".cm-simple-grid__row-group-header").closest("tr");
      
      $($headers).insertAfter($groupTr);
      
      		
  3. Make sure to test
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us