Grouping form fields to reuse them in different forms

Is it possible to make a group a f.e. 5 form fields and save them in a "file". And reuse them in several forms? I want to reuse for example a complete Grid with the fields inside in several forms. Short example please, would be great.
2 Replies
Dan Harrin
Dan Harrinβ€’17mo ago
you could create a static method on your model class and return a Grid containing your form components and then just call that method from any of your form schemas or put it in which class you want
Falk Maria Zeitsprung
Falk Maria Zeitsprungβ€’17mo ago
hey thanks! πŸ™‚
Want results from more Discord servers?
Add your server
More Posts
Is there a way to auto-scrub model attributes that aren't being used?Hello, according to https://filamentphp.com/docs/2.x/admin/resources/security, filament automaticallhow to make uploaded image only visible inside the filament admin panelI have a filament form outside the admin panel where fotos can be uploaded. What do i have to do thaMissing sidebar menu nav``` Alpine Expression Error: Cannot read properties of null (reading 'includes') Expression: "! ($sIs there a way to display no records in the list view by default and only see records when searchin?I want to make it so that: User accesses list records page -> User sees 0 records by default -> UsemutateFormDataBeforeCreate vs dehydrateStateUsingAre they kind of interchangeable? I understand that one is specific to create, but in general, couldModel Policies and AdminIf Im restricting access to the admin to a few select users using canAccessFilament(), do I need to Error when prefilling from query string in resource with persistTabInQueryString enabledHi, I get the following error when persisting tabs in query string enabled when creating a form or uUse createOptionForm and createOptionAction in Radio FieldHow we can use createOptionForm and createOptionAction in Radio Field?How to trigger table action outside table with AlpineJS?I have following table action. How to trigger it (and pass record id) from menu.blade(not filament aIs it possible to use the Table builder without a Query?I'd want to use the table builder without using a Query. I have my own data defined as an array or r