Custom logic and form for CREATE action in Filament Admin Panel #14908
-
PackagePanel builder Package Version3.2.121 How can we help you?Good day everyone! I would like to know if anything has changed in the handling of filament forms in the livewire component? With Laravel 10 the operation worked correctly, but now in Laravel v11 it doesn't work for me, I keep getting an HTTP 500 error. Maybe it's my fault and I missed something. I want to change form's inputs and the default logic of handling the create action for the Account model. If I use the form fields in the html form in the blade view, there is no problem. The problem is with the Or maybe I'm going in the wrong direction and should do it differently? I would be very grateful for your advice, warm regards AccountResource:
Livewire CreateAccountForm:
create-account-form.blade.php
I am using default routes:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You don't need to render a custom form, just use public static function form(Form $form): Form
{
return $form->schema([
Group::make([
TextInput::make('name')
->label('Name on Create'),
])
->visibleOn('create'),
Group::make([
TextInput::make('name')
->label('Name on Edit'),
])
->visibleOn('edit'),
]);
} |
Beta Was this translation helpful? Give feedback.
You can also customize the creation process