considerthis
Member
I would like to hide/show form/details elements depending on another field.
I found this piece of code on another thread. I tried to use this, however, it says I can't access protected property "access". I changed it to Public from Element.php and everything works fine. I would like to find out if there's a better way to achieve this. Thanks in advance
I found this piece of code on another thread. I tried to use this, however, it says I can't access protected property "access". I changed it to Public from Element.php and everything works fine. I would like to find out if there's a better way to achieve this. Thanks in advance
Hi,
I have found a solution to hide elements, perheps somebody helps:
Create a Form php code on action "onCanEditGroup"
Code:$elem = $formModel->getElement('table___element'); $elem->access->view = false; //to hide the element on details view $elem->access->use = false; //to hide the element on edit view
Lars