© 2026 Hedgehog Software, LLC

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

Persist modal text field data after close the modal.

Here I have to change the status from from and If I change the status then a modal is open and ask for description. I want to show that description in my form somewhere after modal close.
How to do that in filament ?
Screenshot_2024-06-04_at_15.41.29.png
Solution
placeholder doesn't have a state.. I think you could add an attribute in the EditPage and use it to set the value

public $description = null;
public $description = null;


Placeholder::make('notes')
    ->content(fn($livewire) => $livewire->description)
Placeholder::make('notes')
    ->content(fn($livewire) => $livewire->description)


->action(function ($record, $data, $livewire) {
    
    $description = $data['description'];
    
    $record->notes()->create([
        'description' => $description,
        'user_id' => auth()->id(),
    ]);

    $livewire->description = $description;
})
->action(function ($record, $data, $livewire) {
    
    $description = $data['description'];
    
    $record->notes()->create([
        'description' => $description,
        'user_id' => auth()->id(),
    ]);

    $livewire->description = $description;
})
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

Cannot close modal after validation
FilamentFFilament / ❓┊help
2y ago
Close Modal After Bulk Action
FilamentFFilament / ❓┊help
3y ago
Livewire Component on ModalContent close modal
FilamentFFilament / ❓┊help
2y ago
Reactive Field does not persist data
FilamentFFilament / ❓┊help
2y ago