inoovum / formcaptcha
此包最新版本(1.0.2)没有提供许可证信息。
验证码表单字段,用于保护收件人免受垃圾邮件的侵扰。
1.0.2
2024-01-15 09:37 UTC
Requires
- neos/form-builder: ^2.2
- neos/neos: *
This package is not auto-updated.
Last update: 2024-09-23 13:20:47 UTC
README
验证码表单字段,用于保护收件人免受垃圾邮件的侵扰。
安装
Inoovum.FormCaptcha 包已在 Packagist 上列出(https://packagist.org.cn/packages/inoovum/formcaptcha),因此您无需再将该包包含在 "repositories" 条目中。
只需运行
composer require inoovum/formcaptcha
用法
使用表单元素 "Captcha" 和验证器 "Captcha validator"。请注意,您必须在电子邮件完成者的模板中排除表单元素 Captcha。
覆盖电子邮件模板
prototype(Neos.Form.Builder:EmailFinisher.Definition) {
options {
templatePathAndFilename = 'resource://Inoovum.FormCaptcha/Private/Templates/Form/Email.html'
}
}
在您自己的电子邮件模板中使用
<f:if condition="{0: formValue.element.type} == {0: 'Inoovum.FormCaptcha:Captcha'}">
<f:else>
<th style="text-align:left;">{f:if(condition: formValue.element.label, then: formValue.element.label, else: formValue.element.identifier)}</th>
<td>{formValue.value}</td>
</f:else>
</f:if>