F
Filament6mo ago
Sael

Multiple create action

So as we all know, there is a default create action on the top of the table. However, i want to add another create action with different inputs. Is that possible? Here i s what i tried so far. it did create two buttons, but the form is the same, how can i change the form of the new button? protected function getHeaderActions(): array { return [ Actions\CreateAction::make('New2') ->label('Target'), Actions\CreateAction::make('New1') ->modal(Product::class) ->form([ TextInput::make('title') ->required() ->maxLength(255), ]),

]; }
Solution:
Thanks, resolved it by using actions from pages. Had to create my own actions, and handle the logic of saving.
Jump to solution
2 Replies
DrByte
DrByte6mo ago
I'd be inclined to extend/clone that CreateAction into your own action, and customize it from there.
Solution
Sael
Sael6mo ago
Thanks, resolved it by using actions from pages. Had to create my own actions, and handle the logic of saving.