using hiddenOn and hidden in conjunction
Currently, there's no way of achieving this, as the last chained call will override the previous.
something like this, quite understandably will not work:
What I'm trying to achieve is, hide a tab in a form on
create
, and on edit
, have a closure to run some custom logic to hide or show it.
The only solution I can think of is duplicating the code for the hiddenOn
method in the hidden
closure, which is less than ideal.
Any suggestions on how to tackle this?2 Replies
Solution
I think you can inject a
$context
parameter in the magic closure:
Oh, I didn't know about
$context
. This does exactly what I want, thank you!