Standard Create Action in modal
Hey guys,
I want to get the standard action for creating an entry in a resource to get this into a modal.
I already got this by removing the create route in getPages().
Is this intended? Or is there a better way?
The problem is now I don't know how to handle the record creation before saving.
Solution:Jump to solution
Ok first for creating new user with an action..
If you want to do it from your list Page. you can add a getheaderActions() on the page class. Then use Filament\Actions\Action::make('new user'')
->form([
// create your form here using Filament\Forms
])...
5 Replies
If I understand clearly you want to create a user with just a modal I.E not redirecting to a create page.
yes, thatβs correct π but I want to add an extra field to the model after validation before saving π
Solution
Ok first for creating new user with an action..
If you want to do it from your list Page. you can add a getheaderActions() on the page class. Then use Filament\Actions\Action::make('new user'')
->form([
// create your form here using Filament\Forms
])
->action(
// your logic to create user here.
)
//you can chain further methods as required
You can do the same from a table Action.
I am stupid π I didn't had a look into the ListInvitation-class.
All the time I looked into the Create class - thank you for pointing me to the right direction π