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:Jump to solution
Thanks, resolved it by using actions from pages. Had to create my own actions, and handle the logic of saving.
2 Replies