What can I use instead of Placeholder in version 4?
'Filament\Forms\Components\Placeholder' is deprecated in version 4.
My current code
Forms\Components\Placeholder::make('name') ->label('Name') ->content(fn ($get) => $get('name')),
7 Replies
TextEntry with ->state()
thanks.That work fine for text input fields. But I also have a question how can I embedded html from rich editor? for example -> description is from rich editor and that code not working.
TextEntry::make('review_description') ->label('Description') ->state(fn ($get) => $get('description')),@awcodes
?
In my case the code was:
Placeholder::make('')->columnSpan(1),
Used to insert an space between a 2 columns component and a 1 column one.
I don't find a way to substitute it.
TextEntry::make(' ')->state(' ')->columnSpan(1)
Requires make and state to have non empty values.
And if I put values on them they show in the form.
the solution is using TextEntry with state
for example ->
TextEntry::make('my_entry')
->state(fn(Get $get) => $get('my_entry')),