F
Filament2mo ago
Nate

How to inject form data into a custom view

In this example I need to send the value of the "details" field through ->viewData([ 'details' => '' ]) I tried $get() but it didn't work
No description
5 Replies
LeandroFerreira
LeandroFerreira2mo ago
try $getGetCallback('details')
Nate
NateOP2mo ago
@LeandroFerreira not working : Typed property Filament\Forms\Components\Component::$container must not be accessed before initialization
LeandroFerreira
LeandroFerreira2mo ago
ohh sorry $getGetCallback()('details')
Nate
NateOP2mo ago
I get the same mistake, I had to do this, this way if I can access the initialized form data with $get The only problem is that I have to press the button to view the data
No description
LeandroFerreira
LeandroFerreira2mo ago
could you share the whole code on gist please?
Want results from more Discord servers?
Add your server