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;


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;
})
Was this page helpful?