You are here

function theme_webform_mail_grid in Webform 6.2

Same name and namespace in other branches
  1. 5.2 components/grid.inc \theme_webform_mail_grid()
  2. 5 components/grid.inc \theme_webform_mail_grid()

Format the output of emailed data for this component.

Parameters

$data: A string or array of the submitted data.

$component: An array of information describing the component, directly correlating to the webform_component database schema.

Return value

Textual output to be included in the email.

File

components/grid.inc, line 210
Webform module grid component.

Code

function theme_webform_mail_grid($data, $component) {
  $questions = _webform_grid_options($component['extra']['questions']);
  $output = $component['name'] . ":\n";
  foreach ($questions as $key => $question) {
    $output .= '  - ' . $question . ':' . ($data[$question] == '' ? '' : ' ' . $data[$question]) . "\n";
  }
  return $output;
}