【问题标题】:Contact Form 7 Date in UK Format英国格式的联系表 7 日期
【发布时间】:2015-10-28 12:58:30
【问题描述】:

我一直在尝试让日期以英国格式显示

这是我用来在网站上显示日期选择器的代码

<p>Lesson Start Date <span>[date date-501 _format_date-501 "D, d M y"]</span> </p>

这是我在邮件部分使用的代码,用于在电子邮件中打印信息

<strong>Lesson Start Date:</strong> [date-501]

但是不能让它工作。

【问题讨论】:

  • 您有很多未选择正确答案的问题。请仔细阅读它们,并在它们被证明有用的地方选择“正确”的答案。

标签: wordpress forms contact


【解决方案1】:

你的事情发生了逆转。 [_format_{field name} "{date format}"] 范式适用于邮件字段,而不是表单字段。这意味着您的邮件字段应该是:

[_format_date-501 "D, d M y"]

您应该从表单的日期字段中删除 _format

<p>Lesson Start Date <span>[date date-501]</span> </p>

阅读有关日期格式的更多信息in the docs

【讨论】:

    猜你喜欢
    • 2018-09-26
    • 1970-01-01
    • 1970-01-01
    • 2019-04-19
    • 1970-01-01
    • 2021-11-18
    • 1970-01-01
    • 2017-05-25
    • 1970-01-01
    相关资源
    最近更新 更多