When exporting submissions using the built in webform reporting tool, the countdown header title appears in the first row, whereas all other fields appear in the 3rd row (composite field titles & the report name name appear in the first two rows). This breaks the layout of the file, as the header rows are then mismatched to their data.

The webform component CSV header component should match the textarea component, eg:

/**
 * Implements _webform_csv_headers_component().
 */
function _webform_csv_headers_textarea($component, $export_options) {
  $header = array();
  $header[0] = '';
  $header[1] = '';
  $header[2] = $component['name'];
  return $header;
}

whereas currently the following is true:

/**
 * Implements _webform_csv_headers_component().
 */
function _webform_csv_headers_countdown($component, $export_options) {
  $header = array();
  $header[0] = $component['name'];
  return $header;
}

I've updated the code, patch to follow.

Comments

andybrace’s picture

Issue summary: View changes
andybrace’s picture

Should have said, I'm using webform_countdown with Webform module version 7.x-3.18.

andybrace’s picture

  • kvnm committed 3ee4c38 on 7.x-1.x authored by andybrace
    Issue #2210369 by andybrace: CSV header positioning
    

  • kvnm committed 3ee4c38 on 7.x-2.x authored by andybrace
    Issue #2210369 by andybrace: CSV header positioning
    
kvnm’s picture

Status: Needs review » Closed (fixed)