0
votes

I have a simple form built with the Webforms module in Drupal. The standard textfield form fields work perfectly. However if I use the preset date or time form values, they don't get emailed properly when the form is submitted.

For instance, if there was a date field in my form, it would submit fine and render on the results page just fine, but if I wanted that value to be included in an email, it would show up as "Array" within the text of the email instead of showing the date.

There is an open support issue within the module issues page, but I'm hoping for any additional help.

2

2 Answers

1
votes

I haven't tried webform, so there might be an issue or something. However, it sounds like you are adding an array of values to the mail instead of the actual value. If this is due to the wrong setup, or a bug in webform, I can't say.

0
votes

It is in fact an array - see http://drupal.org/node/448954 for info. In the case of date fields, the date parts are in a numbered array.

$month = $form_values['submitted_tree']['your_date_field'][0];
$day = $form_values['submitted_tree']['your_date_field'][1];

$year = $form_values['submitted_tree']['your_date_field'][2];