F
Filament16mo ago
Abi

Default Selection for Select Field

I have the following array I am binding to a Select field. And setting the default('text-gray-900) and it doesn't work when the field is set to searchable. If I disable searchable then the default value works.
4 Replies
Abi
Abi16mo ago
For some reason, I am having the same issue with the TextInput as well. The default isn't getting set. Here is the code for the Text Input
TextInput::make('button_text')
->label('Button Text')
->default('Get Started')
->required(),
TextInput::make('button_text')
->label('Button Text')
->default('Get Started')
->required(),
toeknee
toeknee16mo ago
Are you editing an existing record or creating a new one?
Abi
Abi16mo ago
existing record ok, makes sense, my bad..
LeandroFerreira
LeandroFerreira16mo ago
You may use afterStateHydrated if you want
Want results from more Discord servers?
Add your server
More Posts
How to calculate field value based on two other fields?Hi, I have 3 fields: vehicle price, down payment and loan amount. When I fill vehicle price and downUsing custom colorsI've successfully built tailwind with vite, created a new tailwind.config file to override the defauForm Wizard save on every next stepI want to save the current step (or the complete form for that matter) every "Next step". I've creaIs it possible to use Filament components, like the wizard, outside the admin panel?I need to make a wizard for the registration form for customers. It will be outside the Filament admQuestions regarding a "Don't ask again" option for a Password Confirmation Modal...Hi, I want for there to be a way for users to have the option to select "don't ask again" whenever aGetting Url of Resource View PageHello, I think this really a stupid question but is one hour that I'm hitting my head over it and I Ascending and descending sortable option overriding options of sortable columnsHow can I go about fixing this considering each time someone wants to pick an option to sort by, theRepeater in repeater eager loadIt's possible to eager load nested relationship, like Question hasMany Answers and Answer HasMany TaHow can I add a password confirmation to any actionEx: If an admin wants to make an action, a card will pop up asking the admin to re-enter his passworUsing tables with array of data, without the query builderHey there, Can I use filament tables with an array of data. Without specifying the queries at all.