Adding a note on top of a form
I am trying to show a small note section / card on top of the form to create a resource record. Section form component works great, but I can't disable the bottom part where the fields are supposed to go.
I've been looking up the docs for a while, if there is something sutable, I can't find it.
Any suggestion on how to handle this?

Solution:Jump to solution
I don't want to be manually styling and setting views for it either. So here is what I came up with. It is not ideal but it does the trick.
1. Publish the section.index view form the support components provider
2. Publish the components.section view from from filament forms provider.
3. In the section.index checl if the component has a schema and pass it to the form section component
<x-filament::section :has-components="(bool) $getChildComponentContainer()->getFlatComponents()" ... />
...7 Replies
Found out I can make it collapse, but it still can be opened by clicking on the trigger. 🙂
Maybe dont use the heading and description and put a Placeholder form component with HtmlString as content
And for the label of the Placeholder you can also render html I guess, Blade::render('<x-filament::icon icon="heroicon-m-check-circle" class="h-9 w-9 text-gray-950 inline-block" />')); something like that to render an icon as html and whatever you want after that
But there is also a plugin for this https://filamentphp.com/plugins/codewithdennis-simple-alert
Filament
Simple Alert by CodeWithDennis - Filament
A plugin for adding straightforward alerts to your Filament pages.
Yeah, the above trick worked. The package requires building a custom theme, which we want to avoid if possible.
It would've been ideal if it just did not render the empty space for the Section schema, when the schema is empty (has no child components).
Solution
I don't want to be manually styling and setting views for it either. So here is what I came up with. It is not ideal but it does the trick.
1. Publish the section.index view form the support components provider
2. Publish the components.section view from from filament forms provider.
3. In the section.index checl if the component has a schema and pass it to the form section component
<x-filament::section :has-components="(bool) $getChildComponentContainer()->getFlatComponents()" ... />
4. Accept the property in the section component @props(['hasComponents' => false, ...
]) and use it in few of the checks to disable the click event listener, cursor style and the chevron trigger button.
Then use it like usal, wiht defining a schema for it.
What do you think?I am going to stick with it, I like it. Cheers!
By publishing views you will need to manually keep them up to date when the views are changed by a filament update