function webform_results_clear in Webform 7.3
Same name and namespace in other branches
- 5.2 webform_report.inc \webform_results_clear()
- 6.3 includes/webform.report.inc \webform_results_clear()
- 6.2 webform_report.inc \webform_results_clear()
- 7.4 includes/webform.report.inc \webform_results_clear()
Delete all submissions for a node.
Parameters
$nid: The node id whose submissions will be deleted.
1 call to webform_results_clear()
- webform_results_clear_form_submit in includes/
webform.report.inc
File
- includes/
webform.report.inc, line 274 - This file includes helper functions for creating reports for webform.module.
Code
function webform_results_clear($nid) {
$node = node_load($nid);
$submissions = webform_get_submissions($nid);
foreach ($submissions as $submission) {
webform_submission_delete($node, $submission);
}
}