function webform_results_download_form in Webform 5.2
Same name and namespace in other branches
- 6.3 includes/webform.report.inc \webform_results_download_form()
- 6.2 webform_report.inc \webform_results_download_form()
- 7.4 includes/webform.report.inc \webform_results_download_form()
- 7.3 includes/webform.report.inc \webform_results_download_form()
Form to configure the download of CSV files.
1 string reference to 'webform_results_download_form'
- webform_results in ./
webform.module - Menu callback for all content under admin/content/webform.
File
- ./
webform_report.inc, line 298 - This file includes helper functions for creating reports for webform.module
Code
function webform_results_download_form($node) {
include_once drupal_get_path('module', 'webform') . '/webform_export.inc';
$form = array();
$form['node'] = array(
'#type' => 'value',
'#value' => $node,
);
$form['format'] = array(
'#type' => 'radios',
'#title' => t('Export format'),
'#options' => webform_export_list(),
'#default_value' => variable_get('webform_export_format', 'delimited'),
);
$form['delimiter'] = array(
'#type' => 'select',
'#title' => t('Delimited text format'),
'#description' => t('This is the delimiter used in the CSV/TSV file when downloading Webform results. Using tabs in the export is the most reliable method for preserving non-latin characters. You may want to change this to another character depending on the program with which you anticipate importing results.'),
'#default_value' => variable_get('webform_csv_delimiter', '\\t'),
'#options' => array(
',' => t('Comma (,)'),
'\\t' => t('Tab (\\t)'),
';' => t('Semicolon (;)'),
':' => t('Colon (:)'),
'|' => t('Pipe (|)'),
'.' => t('Period (.)'),
' ' => t('Space ( )'),
),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Download'),
);
return $form;
}