Question

I have custom eav table whose attributes I'm getting dynamically on my modifier pool.

But I want to add switcherConfig, as one of my fieldset display is dependent on a selected field value.

Can anyone guide me on how to add switcherConfig in modifier pool?

Was it helpful?

Solution

Adding this content in my modifier pool worked.

'arguments' => [
        'data' => [
            'config' => [
              'switcherConfig' => [
                    'rules' => [
                        "0" => [
                            "value" => 0,
                            "actions" => [
                                "0" => [
                                    "target" => "form.form.fieldset.field",
                                    "callback" => "hide"
                                ]
                            ]
                        ],
                        "1" => [
                            "value" => 1,
                            "actions" => [
                                "0" => [
                                    "target" => "form.form.fieldset.field",
                                    "callback" => "show"
                                ],
                            ]
                        ]
                    ],
                    'enabled' => true
                ]
          ]
]
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top