使用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>
再次发送邮件(我尝试了许多不同的电子邮件地址),但附件总是丢失。怎么了?
答案 0 :(得分: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.
答案 1 :(得分:0)
只需留下钩子&#39;离开,formit处理没有该钩子的文件输入。