0

使用 MODX Revolution 和 Formit,我尝试将文件附加到联系表。邮件已发送,但没有附件。出于某种奇怪的原因,我再也找不到有关附件挂钩的任何信息。最近是否从 Formit 中删除了该功能?

[[!FormIt?
   &hooks=`spam,email,attachments,redirect`
   &emailTpl=`sometemplate`
   &emailTo=`foo@foo.com`
   &emailBCC=`foo2@foo.com`
   &emailSubject=`some subject`
   &redirectTo=`123`
   &validate=`name:required, filedata:required`
]]

<form action="[[~[[*id]]]]" method="post" class="form" enctype="multipart/form-data">
    <input type="text" name="name" id="name" value="[[!+fi.name]]">
    <input id="filedata" name="filedata" type="file" value="[[+fi.filedata]]">
    <button type="submit">SEND</button>
</form>

再次发送邮件(我尝试了许多不同的电子邮件地址),但附件总是丢失。怎么了?

4

2 回答 2

0

只需将钩子“附件”放在一边,formit 处理没有该钩子的文件输入。

于 2018-02-07T00:34:34.897 回答
0

您是否尝试过 https://modx.com/extras/package/ajaxupload2额外?

从描述:

With two FormIt hooks the upload queue could be pre filled from a FormIt field
value and be saved into a FormIt field value. With a third FormIt hook the
uploaded files could be attached to the FormIt mails.
于 2016-06-22T13:47:07.550 回答