infrajs / contacts
此软件包最新版本(v1.0.43)没有提供许可证信息。
联系表单
v1.0.43
2021-09-15 11:05 UTC
Requires
- akiyatkin/form: ~1
- akiyatkin/goal: ~1
- akiyatkin/recaptcha: ~1
- infrajs/controller: ~1
- infrajs/mail: ~1
- infrajs/popup: ~1
- infrajs/session: ~1
- infrajs/view: ~1
- dev-master
- v1.0.43
- v1.0.42
- v1.0.41
- v1.0.40
- v1.0.39
- v1.0.38
- v1.0.37
- v1.0.36
- v1.0.35
- v1.0.34
- v1.0.33
- v1.0.32
- v1.0.31
- v1.0.30
- v1.0.29
- v1.0.28
- v1.0.27
- v1.0.26
- v1.0.25
- v1.0.24
- v1.0.23
- v1.0.22
- v1.0.21
- 1.0.20
- 1.0.19
- 1.0.18
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
This package is auto-updated.
Last update: 2024-09-24 10:58:55 UTC
README
通过 composer.json 安装
{ "require":{ "infrajs/infrajs":"~1", "infrajs/contacts":"~1" } }
与 infrajs 一起使用
<script type="text/javascript" src="/-collect/?js"></script>
弹出窗口中的表单
<a href="/contacts" class="showContacts">Форма контактов</a>
页面上的表单
<div id="form"></div> <script async type="module"> import { Event } from '/vendor/infrajs/event/Event.js' import { Controller } from '/vendor/infrajs/controller/src/Controller.js' Event.one('Controller.onshow', function () { Controller.check({ "div":"form", "tplroot":"form", "external":"-contacts/contacts.layer.json" }); }); </script>
回电
Popup.show({ "external":"-contacts/callback/layer.json" });
file=true
此选项允许在消息中附加文件,该文件将保存在 .contacts/ 文件夹中,与消息本身相邻。需要手动重写模板并添加相应的 input,其中 name="file" 且 type="file"。此外,还需要将消息添加到邮件模板中。邮件数据中会包含参数 file,其中包含保存文件的路径。文件大小限制为 filesize 兆字节。
data-text 和 data-replace
具有 showContacts
标签的属性
data-text=""
- 如果表单中没有其他消息,则添加消息到联系表单data-replace=""
- 用新消息替换表单中的消息