sitegeist/fusionform-friendlycaptcha

FriendlyCaptcha 字段和验证器,适用于 Neos.Fusion.Form

1.2.0 2023-05-08 12:39 UTC

This package is auto-updated.

Last update: 2024-09-08 15:40:07 UTC


README

此包用于将 FriendlyCaptcha 集成到 FusionForms 中。该包为 Fusion.Runtime.Forms 提供字段输入和匹配验证器。

作者和赞助商

本包的开发和公共发布得到了我们雇主 http://www.sitegeist.de 的慷慨赞助。

安装

Sitegeist.FusionForm.FriendlyCaptcha 可通过 Packagist 运行 composer require sitegeist/fusionform-friendlycaptcha 获得。我们使用语义版本控制,每次重大变更都会增加主版本号。

使用

prototype(Vendor.Site:RuntimeForm) < prototype(Neos.Fusion.Form:Runtime.RuntimeForm) {
    @context {
        showCaptcha = ${this.showCaptcha}
    }

    process {
        content = afx`
            <Sitegeist.FusionForm.FriendlyCaptcha:Scripts @if.1={showCaptcha} />
            ... here be content ...
            <Neos.Fusion.Form:FieldContainer field.name="captchaValidatorField" @if.1={showCaptcha}>
                <Sitegeist.FusionForm.FriendlyCaptcha:Captcha />
            </Neos.Fusion.Form:FieldContainer>
        `

        schema {
            captchaValidatorField = ${Form.Schema.string()}
            captchaValidatorField.@process.captchaValidator = ${value.validator('Sitegeist.FusionForm.FriendlyCaptcha:FriendlyCaptcha')}
            captchaValidatorField.@if.showCaptcha = ${showCaptcha}
        }
    }

    action { ... }
}

贡献

我们非常欢迎贡献。请发送给我们 pull request。