FilamentF
Filament3y ago
Greg

Set initial value for hidden field

I'm new to Filament but experienced with PHP and Laravel.

I saw in the FormBuilder documentation creating a hidden field (Hidden::make('token')) but I can't find any info on setting its value to a default. I tried ->fill but got an error about accessing the Component before it's initialized.

What am I missing?

Thank you!
Solution
I just found ->default(). Any reason not to use that?
Was this page helpful?