OctoberCMS:触发事件不起作用

OctoberCMS: Trigger events doesn't work

阅读这篇(和其他...)文档文章 (link) 后,我找不到我这边的问题...

我无法启动触发事件...所以这是我的代码:

//fields.yaml

fields:
    gallery:
        label: Galeria
        span: full
        oc.commentPosition: ''
        prompt: 'Add new item'
        type: repeater
        form:
            fields:
                type:
                    label: 'Select the type of a gallery item'
                    span: full
                    type: galleryplusvideoselect
                galleryplusvideo:
                    label: Gallery
                    span: full
                    oc.commentPosition: ''
                    type: galleryplusvideo
                    hidden: true
                    trigger:
                        action: show
                        field: type
                        condition: value[image]

//图库加视频选择_widget.htm 文件

<div data-control="balloon-selector" class="control-balloon-selector">
    <ul>
        <li data-value="image" <?php if($type == "image") echo 'class="active"'; ?>>Image</li>
        <li data-value="video" <?php if($type == "video") echo 'class="active"'; ?>>Video</li>
    </ul>

    <input type="text" onkeyup="
            $(this).trigger('change')" <!-- <--- THIS IS ONLY TO REPRODUCE AN EXAMPLE FROM THE DOCUMENTATION -->
    name="<?=$name ?>" value="<?= $type ?>" />
</div>

我尝试创建一个简单的复选框和文本区域,并在转发器外部创建触发器功能...但它不起作用...我找不到任何JS 类型 "activation" 所以我不知道我可以做些什么来让它工作...

去掉hidden: true。触发器 action: show 属性 将自动隐藏您的字段,无需双重隐藏。交叉张贴在 OctoberCMS issue repository