Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Issue
The Drupal alter shown below is not documented in the webform.api.php file.
function webform_results_download_submission_information($node, $options = array()) {
$submission_information = module_invoke_all('webform_results_download_submission_information_info');
drupal_alter('webform_results_download_submission_information_info', $submission_information);
Solution
Add something like the following to the API file.
/**
* Implements hook_webform_results_download_submission_information_info_alter().
*/
function webform_webform_results_download_submission_information_info_alter(&$submission_information) {
// Hide webform submission IP addresses.
if (isset($submission_information['webform_ip_address'])) {
unset($submission_information['webform_ip_address']);
}
}
Comment | File | Size | Author |
---|---|---|---|
#3 | webform-api-missing-hook-3119214-3.patch | 860 bytes | solideogloria |
|
Comments
Comment #2
Liam MorlandThanks. Please write-up your change as a patch.
Comment #3
solideogloria CreditAttribution: solideogloria commentedAdded the hook to the API file right after the hook that provides the data it alters.
Comment #5
Liam MorlandThanks!