wordpress - 联系表格 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*...
任何指针都非常感谢。我已经搜索但没有发现类似的问题。
解决方案
我发现了自己的愚蠢。我在联系表单编辑器的 FORM 选项卡上创建了表单,但没有转到定义生成电子邮件布局的 MAIL 选项卡。默认情况下,所有其他字段都包含在邮件模板中,但不包含文件附件。一旦我添加了对两个文件上传元素的引用,一切都很好。
推荐阅读
- python - 不在 GPU 上运行卷积神经网络
- python - 将 pandas 数据框从宽变为长
- graphql - 缓存更新中的 Graphql 别名数据对象
- sql - Postgres:SQL 错误 [42883]:错误:运算符不存在:uuid = text
- python - Python Scraping:无论如何,我可以使用 beautifulsoup 来抓取这行代码吗?(查找包含特定标签/字符串的标签内容)
- flutter - 颤振 Gradle 任务组装调试失败
- pyspark - 如何使用 PySpark 中的二元组/n-gram 算法到达字符列表?
- ios - xamarin.forms 自今天更新 (15.9.2021) 以来无法再发布到应用商店显示图标大小错误
- spring - Mockito Powermock 不模拟构造函数
- google-cloud-firestore - 尝试从我的 Google 云功能访问我的 Firestore 数据库,但我在服务器日志中不断收到错误消息