Inject other field state into viewData on ViewField
Hi,
I have a field that is
ToggleButtons
. I then have another field which is a ViewField
which I would like to regenerate depending on the option that is selected in the ToggleButtons
field.
At the moment, the way that I do this is to use $getRecord()
in the view and then look at the value in the toggle field. The problem is that it only updates when the record is saved (as you would expect).
I'd like to look at the state as is in the form before saving but I can't find a way to do this because view
and viewData
do not accept a closure for me to pass Get $get
into it. I did attempt to find the field based on the $form
using getComponent
but with no luck
Any ideas on a simple solution for this?
Thanks5 Replies
Bump
Have you set your togglebutton to
->live()
It sure is
Solution
use in the view
Amazing, works a treat π