You are here

function theme_webform_mail_date in Webform 6.2

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

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

string Textual output to be included in the email.

File

components/date.inc, line 291
Webform module date component.

Code

function theme_webform_mail_date($data, $component) {
  $output = $component['name'] . ':';
  if ($data[0] && $data[1]) {
    $timestamp = strtotime($data[0] . '/' . $data[1] . '/' . $data[2]);
    $format = webform_date_format('medium');
    $output .= ' ' . format_date($timestamp, 'custom', $format, 0);
  }
  return $output;
}