首页 > 解决方案 > 联系表格 7 不提供附件

问题描述

我已经检查了相关的现有问题,它们与此不同。

基本上我正在尝试使用文件上传功能,但生成的电子邮件缺少附件。

我创建了一个包含两个文件上传元素的表单。提交后,表单说它发送OK,它到达但附件丢失。

短代码标签:[contact-form-7 id="273" title="你有东西要分享吗?"]

表单定义:您的姓名(必填)[text* your-name]

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

<label> The title of the work
    [text your-subject] </label>

<label> Any comments you wish to make about the work
    [textarea your-message] </label>
<label> The work you wish to share - (max file size 2Mb) (in Open Document format (LibreOffice or OpenOffice Write (.odt), MS Word (.doc, .docx) or plain text(.txt)
[file* your-story limit:2mb filetypes:odt|doc|docx|txt|pdf id:fileupload] 
</label>

<label> (optional) A picture (.png, .jpg only) to illustrate your work (max file size 2Mb) (please respect copyright requirements)
[file your-image limit:2mb filetypes:jpg|jpeg|png id:imageupload]
</label>
[recaptcha]
[submit "Send"]

表单是使用表单生成器生成的。只有字幕是手工编辑的。我不确定为什么一个有 [file... 而另一个 [file*...

任何指针都非常感谢。我已经搜索但没有发现类似的问题。

标签: wordpressfile-uploadcontact-form

解决方案


我发现了自己的愚蠢。我在联系表单编辑器的 FORM 选项卡上创建了表单,但没有转到定义生成电子邮件布局的 MAIL 选项卡。默认情况下,所有其他字段都包含在邮件模板中,但不包含文件附件。一旦我添加了对两个文件上传元素的引用,一切都很好。


推荐阅读