Serialized Array Fields in Admin Config Don't Obey <depends> #3315
BrianPittVP
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
Good timing! I believe this was fixed by #3307 just a few days ago, could you check if it solves your issue? |
Beta Was this translation helpful? Give feedback.
1 reply
-
I can`t test anything right now. Can we improve Testcase and possible solution: https://magento.stackexchange.com/questions/179664/admin-config-show-field-depending-on-selected-multiselect-values |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I ran into an issue recently when trying to add dependencies to fields in the admin system config for a custom module. For simple fields like text boxes, the fields can show/hide based on the value of another field, such as a Yes/No select box. However, if you have a serialized array field that displays a table with rows, this doesn't work.
I tracked down the issue to the
app/design/adminhtml/default/default/template/system/config/form/field/array.phtml
template. It is hard-coded to prepend grid to whatever the HTML ID is, but the dependency logic doesn't understand that. I was able to make it work by simply removing the grid_ from the beginning of the id attribute in the<div class="grid" ...>
container. It doesn't appear to cause any problems, but I haven't fully tested every possible scenario.Does anyone know if there's a reason why this was excluded from the dependency logic and/or if it makes sense to make this change to the core?
Beta Was this translation helpful? Give feedback.
All reactions