function webform_results_download_default_options in Webform 7.4
Get options for creating downloadable versions of the webform data.
Parameters
$node: The webform node on which to generate the analysis.
string $format: The export format being used.
Return value
array Option for creating downloadable version of the webform data.
4 calls to webform_results_download_default_options()
- drush_webform_export in ./
webform.drush.inc - Exports a webform via drush.
- webform_results_download_form_submit in includes/
webform.report.inc - Submit handler for webform_results_download_form().
- webform_results_export in includes/
webform.report.inc - Generate a Excel-readable CSV file containing all submissions for a Webform.
- webform_results_export_batch in includes/
webform.report.inc - Return a Batch API array of commands that will generate an export.
File
- includes/
webform.report.inc, line 1313 - This file includes helper functions for creating reports for webform.module.
Code
function webform_results_download_default_options($node, $format) {
$submission_information = webform_results_download_submission_information($node);
$options = array(
'delimiter' => webform_variable_get('webform_csv_delimiter'),
'components' => array_merge(array_keys($submission_information), array_keys(webform_component_list($node, 'csv', TRUE))),
'header_keys' => 0,
'select_keys' => 0,
'select_format' => 'separate',
'range' => array(
'range_type' => 'all',
'completion_type' => 'all',
),
);
// Allow exporters to merge in additional options.
$exporter_information = webform_export_fetch_definition($format);
if (isset($exporter_information['options'])) {
$options = array_merge($options, $exporter_information['options']);
}
return $options;
}