Edit or Customize Column Headers on Reports Slide

Good day, all!

I’ve been looking at adding a reports slide to a quiz and really like that I can show and hide a lot of the information available and while I also like the detailed results area, it has a bit too much information.

Fortunately I found this post where @PhuongThuy_Le explained how we can hide specific columns…great stuff! I wonder, though, is there a way to customize the column headers with code? For example, the first column header is No., but is there I way I could change it to say Question Number, or instead of Slide Index change it to Slide Number for example?

I asked this on the thread in the referenced post, but in case it got buried in the old conversation, I thought I’d start it new here.

TIA!
samamara

Good morning @samamara,

Please try adding the scripts below to the Report Slide’s On Load event:

var columnHeaders = { // index : label
    1: 'Question Number',
    2: 'Slide Number'
};
 
for (var index in columnHeaders) {
    $('table th:nth-child(' + index + ')', this.node).text(columnHeaders[index]);
}

Then, edit more at columnHeaders to display as desired.

BR,
Thuy

1 Like

Thanks so much @PhuongThuy_Le! I was able to use this to do exactly what I wanted and I was able to combine it with the code you gave on the other post to both limit the number of columns and rename them a well :folded_hands:t2:

Thanks again!

Thanks for getting back to me, @samamara
That’s great to know that it helps :slight_smile:

1 Like