Euler
Euler
FFilament
Created by Euler on 2/29/2024 in #❓┊help
How to set default in ToogleButtons?
Also needed to be included:
public ?array $data = [];
public ?array $data = [];
Solved!
8 replies
FFilament
Created by Euler on 2/29/2024 in #❓┊help
How to set default in ToogleButtons?
Omg! I didn't really pay attention to that. Thank you very much, Leandro.
8 replies
FFilament
Created by Euler on 2/29/2024 in #❓┊help
How to set default in ToogleButtons?
This is used in the Order Status of the demo filament. However, I couldn't find the demo code on github where it defines who is enabled in the status.
8 replies
FFilament
Created by Euler on 2/29/2024 in #❓┊help
How to set default in ToogleButtons?
I tried using ->default() when creating, but the page where I see this button starts without any enabled.
public function form(Form $form): Form
{
return $form
->schema([
ToggleButtons::make('status')
->options([
'option1' => 'First Option',
'option2' => 'Second Option',
'option3' => 'Third Option',
])
->default('option2')
]);
}
public function form(Form $form): Form
{
return $form
->schema([
ToggleButtons::make('status')
->options([
'option1' => 'First Option',
'option2' => 'Second Option',
'option3' => 'Third Option',
])
->default('option2')
]);
}
I apologize if I'm talking nonsense. I'm really new to laravel and filament.
8 replies