How to add 'switcherConfig' to a Modifier pool on Magento2
-
14-03-2021 - |
Domanda
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?
Soluzione
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
]
]
]
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange