© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
11 replies
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?
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Using $set on hidden field
FilamentFFilament / ❓┊help
13mo ago
Set value of key-value field
FilamentFFilament / ❓┊help
3y ago
Setting a default value for hidden fields
FilamentFFilament / ❓┊help
3y ago
Need help updating value of hidden field via retrieving value from database and set
FilamentFFilament / ❓┊help
3y ago