© 2026 Hedgehog Software, LLC

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

Dynamic text/header in RelationshipManager modal

Is there anyway we can achive a dynamic content for a PlaceHolder field, based on the current record (not the owner record) ?

Ie. I want a header of sorts that is based on the data extracted in mountUsing()

        return \Filament\Tables\Actions\Action::make('Anvendelse')
            ->mountUsing(function (Forms\ComponentContainer $form, \App\Models\Ownership $record) {
                return $form->fill([
                    'test' => $record->created_at,
                ]);
            })
            ->form(
                [
                    Placeholder::make('apartment1')->content($rm->ownerRecord),
                    Forms\Components\TextInput::make('test'),
                ])
        ;
        return \Filament\Tables\Actions\Action::make('Anvendelse')
            ->mountUsing(function (Forms\ComponentContainer $form, \App\Models\Ownership $record) {
                return $form->fill([
                    'test' => $record->created_at,
                ]);
            })
            ->form(
                [
                    Placeholder::make('apartment1')->content($rm->ownerRecord),
                    Forms\Components\TextInput::make('test'),
                ])
        ;
Solution
Figured it out... simple really 🫣

Placeholder::make('test')->content(function ($state) {return new HtmlString($state); }),
Placeholder::make('test')->content(function ($state) {return new HtmlString($state); }),


With the test data filled using mountUsing
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

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Modal Dynamic Content
FilamentFFilament / ❓┊help
15mo ago
Multi line text in modalDescription
FilamentFFilament / ❓┊help
2y ago
Add modal actions in panel header
FilamentFFilament / ❓┊help
6mo ago
In RelationshipManager modal form, how I can validate Repeater form
FilamentFFilament / ❓┊help
16mo ago