As per title, I have a date field in a simple form. The date field is saved correctly to the database, however, the field is blank in the resulting email.

CommentFileSizeAuthor
#3 webform-date.patch852 bytesJorrit

Comments

max6166’s picture

Title: Date not email in results » Date not in email results
max6166’s picture

I downgraded to v2.1.2 and the date is working again. So something related to the 2.1.3 date bug fix seems to be the cause.

Incidentally, this is a fantastic module! :)

Jorrit’s picture

StatusFileSize
new852 bytes

I got this problem as well. The attached patch fixes this as far as I can see. For those who don't know how to process patch files:

1) Open date.inc in components
2) Find

function theme_webform_mail_date($data, $component) {
  $output = $component['name'] .":";
  if ($data['month'] && $data['day']) {
    $timestamp = strtotime($data['month'] ."/". $data['day'] ."/". $data['year']);
    $format = webform_date_format('medium');
    $output .= ' '. date($format, $timestamp);
  }

  return $output;
}

3) Replace with

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 .= ' '. date($format, $timestamp);
  }

  return $output;
}

PS: this is for the D6 version, but I guess the fix for D5 is similar

quicksketch’s picture

Priority: Critical » Normal
Status: Active » Fixed

Thanks Jorrit! I committed your fix.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

quicksketch’s picture

Status: Closed (fixed) » Fixed

Moving to "fixed" until the 2.2 version is released.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.