F
Filamentโ€ข2mo ago
Shaheen

Placholder component doesn't render state by default

every time I use the Placeholder component I have to manually set the content to the state using Placeholder::make('name')->content(fn($state) => $state) Am I doing something wrong or this is supposed to be default behaviour? if it's default behaviour why is it doesn't have content set to state by default?
1 Reply
Will ๐Ÿ‡ฌ๐Ÿ‡น
Expected behaviour https://filamentphp.com/docs/3.x/forms/layout/placeholder Since they are used to render text-only fields they are not bind to a "property". So it makes sense to access the $record if thats how you want to use it

Did you find this page helpful?