function hook_webform_csv_data_alter in Webform 7.4
Same name and namespace in other branches
- 6.3 webform.api.php \hook_webform_csv_data_alter()
- 7.3 webform.api.php \hook_webform_csv_data_alter()
Alter a Webform submission's data when exported.
Related topics
1 invocation of hook_webform_csv_data_alter()
- webform_results_download_rows_process in includes/
webform.report.inc - Processes the submissions to be downloaded into exported rows.
File
- ./
webform.api.php, line 423 - Sample hooks demonstrating usage in Webform.
Code
function hook_webform_csv_data_alter(&$data, $component, $submission) {
// If a value of a field was left blank, use the value from another
// field.
if ($component['cid'] == 1 && empty($data)) {
$data = $submission->data[2]['value'][0];
}
}