How can I render form builder components in a custom view?
Hi guys, is there documentation on how to use the form builder on a custom view? I have my form schema defined, what's the convention to render the fields on my custom view page?
My resource defines a custom page:
I defined a custom view on this page, so I can use a 3rd party datatable library on it:
I also defined a form schema:
My question is, how can I render those form fields on my custom view page? I couldn't find what convention (eg
<x-filament-.... />
) to use on the docsSolution:Jump to solution
The general recommendation is to create a custom Livewire component, add the form(s) to it, and then add the component to your custom page :
...
4 Replies
The page looks like this. The 'name search' field above the table is just raw html, not actually a filament component. I want to render the actual field component that I defined on getFormSchema
Solution
The general recommendation is to create a custom Livewire component, add the form(s) to it, and then add the component to your custom page :
When you create the Livewire component, you can follow from here in the docs :
https://filamentphp.com/docs/2.x/forms/getting-started#preparing-your-livewire-component
Perfect this is what I needed, thank you!