Drupal Webforms 模块 - 表单结果显示“Array”而不是表单值

发布于 2024-08-03 09:03:09 字数 227 浏览 4 评论 0原文

我有一个使用 Drupal 中的 Webforms 模块构建的简单表单。标准文本字段表单字段工作得很好。但是,如果我使用预设的日期或时间表单值,则在提交表单时不会正确通过电子邮件发送它们。

例如,如果我的表单中有一个日期字段,它会很好地提交并在结果页面上呈现,但如果我希望该值包含在电子邮件中,它将在文本中显示为“数组”电子邮件而不是显示日期。

模块问题页面中有一个开放的支持问题,但我希望获得任何其他帮助。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦巷 2024-08-10 09:03:09

我还没有尝试过网络表单,所以可能存在问题或其他问题。但是,听起来您正在向邮件添加一组值而不是实际值。如果这是由于错误的设置或网络表单中的错误造成的,我不能说。

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.

迟到的我 2024-08-10 09:03:09

它实际上是一个数组 - 请参阅 http://drupal.org/node/448954 了解信息。对于日期字段,日期部分位于编号数组中。

$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];

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];
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文