I have created a custom tab in system config and added 1 field
Module Enable Yes/No and
1 Dynamic fields which is depends on Module Enable.
When Module Enable is set Yes I created various dynamic fields and save it. which works fine.
When module is set to No and save after page reload all of my dynamic rows are gone. I using a Plugin and
The reason is when is set to no the data from dynamic fields does not get send in the post. see post value from Plugin:
Array ( [section] => custom_system_config [website] => [store] => [groups] => Array ( [general] => Array ( [fields] => Array ( [enable] => Array ( [value] => 0 ) [filter] => Array ( [value] => Array ( [__empty] => ) ) ) ) ) )
Dynamics Fields have depend on module enable field:
... <depends> <field id="enable">1</field> </depends> ...
The filter should have an array with fields.
In My Plugin How can I not save the data if enable is set to No?
Because this is still saving empty values obviously.
Appreciate any help!