© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
2 replies
Pscl

Adding Custom Action to TopBar

Hey all,

//AppServiceProvider.php

FilamentView::registerRenderHook(
            PanelsRenderHook::GLOBAL_SEARCH_AFTER,
            function () {
                $action = Action::make('sendIdea')
                    ->label('moep')
                    ->form([
                        TextInput::make('subject')->required(),
                        // RichEditor::make('body')->required(),
                    ])
                    ->action(function (array $data) {
                        // Handle the action logic here
                        dd($data);
                    });

                return view('components.send-idea-button', compact('action'));
            }
        );

//send-idea-button.blade.php
<div>
    {{ $action }}
</div>
//AppServiceProvider.php

FilamentView::registerRenderHook(
            PanelsRenderHook::GLOBAL_SEARCH_AFTER,
            function () {
                $action = Action::make('sendIdea')
                    ->label('moep')
                    ->form([
                        TextInput::make('subject')->required(),
                        // RichEditor::make('body')->required(),
                    ])
                    ->action(function (array $data) {
                        // Handle the action logic here
                        dd($data);
                    });

                return view('components.send-idea-button', compact('action'));
            }
        );

//send-idea-button.blade.php
<div>
    {{ $action }}
</div>


The button is displayed at topbar, but the magic of opening the form is not happening.

Which piece of the puzzle am I missing? Thanks for support!
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

action button in topbar
FilamentFFilament / ❓┊help
17mo ago
Action button on Topbar
FilamentFFilament / ❓┊help
2y ago
Adding custom form action button
FilamentFFilament / ❓┊help
3y ago
Add Custom Header(topbar)
FilamentFFilament / ❓┊help
11mo ago