Hide and set value don't work simultaneously
I have a Form with two fields,
redeemer_type
and redeemer_id
and I want to set the redeemer_id
to NULL and hide it when the redeemer_type
is null. My code works fine if I comment the hidden part of the redeemer_id
, any ideas?
Solution:Jump to solution
I think your code should work. Could you try this?
```php
Select::make('redeemer_type')
->label(__('Type'))...
4 Replies
what is the error?
The error is that if I hide the
redeem_id
when the redeemer_type
is NULL
it is not set to NULL
. However if I don't hide it the behaviour is correct.Solution
I think your code should work. Could you try this?
Awesome! Thanks a lot. It works great