You are here

function webform_results_table in Webform 6.3

Same name and namespace in other branches
  1. 5.2 webform_report.inc \webform_results_table()
  2. 6.2 webform_report.inc \webform_results_table()
  3. 7.4 includes/webform.report.inc \webform_results_table()
  4. 7.3 includes/webform.report.inc \webform_results_table()

Create a table containing all submitted values for a webform node.

1 string reference to 'webform_results_table'
webform_menu in ./webform.module
Implements hook_menu().

File

includes/webform.report.inc, line 168
This file includes helper functions for creating reports for webform.module

Code

function webform_results_table($node, $pager_count = 0) {
  if (isset($_GET['results']) && is_numeric($_GET['results'])) {
    $pager_count = $_GET['results'];
  }

  // Get all the submissions for the node.
  $header = theme('webform_results_table_header', $node);
  $submissions = webform_get_submissions($node->nid, $header, $pager_count);
  $total_count = webform_get_submission_count($node->nid);
  $output = theme('webform_results_table', $node, $node->webform['components'], $submissions, $total_count, $pager_count);
  if ($pager_count) {
    $output .= theme('pager', NULL, $pager_count, 0);
  }
  return $output;
}