winter icon indicating copy to clipboard operation
winter copied to clipboard

Trigger events field with ^ parent selector does not work (nestedform)

Open AIC-BV opened this issue 3 years ago • 0 comments

Winter CMS Build

1.2

PHP Version

8.1

Database engine

MySQL/MariaDB

Plugins installed

Winter.Sitemap, Winter.Pages, Winter.TinyPNG, Winter.Translate, Winter.Redirects, Aic.Globals, Aic.ExtendWinterPages, Aic.Blog, Aic.Team, Aic.Account, Aic.Contact, Aic.Invoice, Aic.Discount, Aic.Aftersales, Aic.Reviews, Aic.Faq, StudioBosco.BackendNotifications, StudioBosco.BackendComments, ...

Issue description

Adding a trigger to your form with the fields parent selector does not work

block_gallery:
    name: Gallery
    icon: icon-camera-retro
    fields:
        type:
            label: Type
            type: balloon-selector
            default: grid
            options:
                grid: Grid
                slider: Slider
        data:
            type: nestedform
            usePanelStyles: false
            cssClass: custom-nested-form
            form:
                tabs:
                        images:
                            tab: Images
                            type: repeater
                            form:
                                fields:
                                    caption:
                                        label: Caption
                                        type: richeditor
                                        size: small
                                        trigger:
                                            action: hide
                                            field: ^^type
                                            condition: value[grid]

No matter how many thingies ^^^ I add, the trigger never happens

Steps to replicate

  1. Create a plugin
  2. Use the code above
  3. Check the trigger and notice it won't trigger

Workaround

I added a comment, which is an -ok acceptable- workaround for my case commentAbove: Not for type - GRID

AIC-BV avatar Sep 27 '22 13:09 AIC-BV