You are here

function theme_webform_mail_grid in Webform 5

Same name and namespace in other branches
  1. 5.2 components/grid.inc \theme_webform_mail_grid()
  2. 6.2 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 193

Code

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