联系表 7...关于并非所有字段都已发送

联系表 7...关于并非所有字段都已发送

我偶然发现了一个类似的话题。但解决方案只针对特定情况,没有提及其背后的原理……

我的“联系表单 7”表单选项卡如下所示:

<label> Name (required)
    [text* your-name] </label>

<label> Email (required)
    [email* your-email] </label>

<label> Phone
    [tel Phone] </label>

<label> Wedding Date
     [date Wedding Date] </label>

 </label> Where did you find us?
         [text Where did you find us?]

<label> Your Message
    [textarea your-message] </label>

[submit "Send"]

邮件标签如下:

From: [your-name] <[your-email]>
Subject: [your-subject]

Message Body:
[your-message]

显然,我没有收到发送到我的电子邮件中的所有字段。有谁能理解代码,告诉我如何翻译我的形式我需要放入的邮件标签?

答案1

首先,表单需要使用单个单词或字符串作为字段名称。这可确保您有一个要捕获的字段。

 <label> Name (required)
     [text* your-name] </label>

 <label> Email (required)
     [email* your-email] </label>

 <label> Phone
     [tel Phone] </label>

 <label> Wedding Date
     [date Wedding-Date] </label>

 <label> Where did you find us?
     [text source] </label>

 <label> Your Message
     [textarea your-message] </label>

 [submit "Send"]

然后需要将表单中的字段添加到电子邮件中:

 From: [your-name] <[your-email]>
 Subject: [your-subject]

 Date: [Wedding-Date]
 Phone: [Phone]
 Source: [source]

 Message Body:
 [your-message]

相关内容