© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
humunuk

Unsavedchanges feature outside of panels

Can you enable "unsaved changes" feature per form? F.e - when using form on a custom page, outside of panel
Solution
Answering myself, turns out you can, there is HasUnsavedDataChangesAlert trait that you can use and component: <x-filament-panels::page.unsaved-data-changes-alert />

// in your custom page

class ViewWorkRequest extends ViewRecord
{
    use HasUnsavedDataChangesAlert;


    public function mount(int|string $record): void
    {
        parent::mount($record);
        $this->hasUnsavedDataChangesAlert();
        $this->form->fill();
    }
 }

// in blade file
<div>
    {{ $this->form }}

    <div class="mt-6 text-end">
        <x-filament::button wire:click="save">
            Save
        </x-filament::button>
    </div>

    <x-filament-panels::page.unsaved-data-changes-alert />
</div>
// in your custom page

class ViewWorkRequest extends ViewRecord
{
    use HasUnsavedDataChangesAlert;


    public function mount(int|string $record): void
    {
        parent::mount($record);
        $this->hasUnsavedDataChangesAlert();
        $this->form->fill();
    }
 }

// in blade file
<div>
    {{ $this->form }}

    <div class="mt-6 text-end">
        <x-filament::button wire:click="save">
            Save
        </x-filament::button>
    </div>

    <x-filament-panels::page.unsaved-data-changes-alert />
</div>
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Register page outside the panels
FilamentFFilament / ❓┊help
2y ago
Filament Language Switch not visible outside panels
FilamentFFilament / ❓┊help
2y ago
How can i use filament blade components outside of filament panels?
FilamentFFilament / ❓┊help
2y ago
Adding tab filters to table, outside of Panels in a livewire component
FilamentFFilament / ❓┊help
3y ago