Replies: 2 comments 3 replies
-
->formatStateUsing(fn(?YourModel $record) => $record?->field ?? 'default') |
Beta Was this translation helpful? Give feedback.
3 replies
-
You can use an approach like this to retrieve a value from the database: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Package
Form builder
Package Version
v3.2
How can we help you?
Hello,
I'm new to filament/laravel. I want to set a default value to textinput and this value should come from the database. Is there anyway I can do that?
Say for example, I want to retrieve a record that is only "active" in the database and I want that to be the default value of the text input.
Thanks for the help
Beta Was this translation helpful? Give feedback.
All reactions