Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

medcharrafi's avatar

custom form in filament after the original form

Hi Laravel community,

I hope you're all doing well. I'm currently working on a project using Filament, and I have a specific requirement that I'm trying to address.

In my Filament resource, I need to enhance the create page by adding a custom form that is not directly related to the resource's model. I want to gather additional information during the create process.

Is there a recommended way to achieve this in Filament? I've explored [mention any approaches you've tried or considered], but I'd love to hear from the community about any best practices or potential solutions.

0 likes
2 replies
aurawindsurfing's avatar
Level 50

Hi @medcharrafi

What you are looking at is probably hooking up to one of the lifecycle hook of an action: https://filamentphp.com/docs/3.x/actions/prebuilt-actions/create#lifecycle-hooks

Inside you modal - that is if you use modals - you can also build up whole separate form https://filamentphp.com/docs/3.x/actions/modals#modal-forms and you will have access to the variables created like so:

$data['authorId']

As per above example. Action is just a function so you can do whatever you like inside of it.

Hope it helps!

medcharrafi's avatar

@aurawindsurfing i use render hooks https://filamentphp.com/docs/3.x/support/render-hooks

   public function handle(Request $request, Closure $next): Response
    {
        FilamentView::registerRenderHook(
            'panels::page.end',
            fn () => view('add-user-activity'),
            scopes: \App\Filament\Resources\TaskUserResource\Pages\CreateTaskUser::class,
        );
        return $next($request);
    }
}  

but i build everything sperately within a livewire component

Please or to participate in this conversation.