F
Filament15mo ago
SirFat

Reusable Components (potentially with the ability to add many)

Hi, I'm trying to understand the best way to approach this - I want to create a generic contact 'contract' - which can be reused in amongst other forms. Use case: * A complex 'Person/Contact' creation module which manages addresses, phone numbers, name, birthdates each. * If multiple are permitted, the user should be able to 'some how' on the same screen elect which is 'primary' and which is 'billing'. * The 'Person/Contact' control would be used on a Livewire form to create orders, but the same 'Person/Contact' control would be available when looking at an account directly. Thanks!
3 Replies
SirFat
SirFatOP14mo ago
Bump
Patrick Boivin
Patrick Boivin14mo ago
Start by thinking about your models. What are all the entities at play here and what are the relationships between them? It'll be easier to translate that into Filament concepts when you have defined the data layer.
SirFat
SirFatOP14mo ago
Yeah I have a pretty good idea of the models at play and how they relate, it was more how they get boxed together into a single form that can be deployed in a number of ways. I'm still learning on the fly here, but I think the answer may actually be in a different approach. Whereas I'm looking at it similar to a .NET user control, which is a completely isolated asset, one suggestion I've seen along the way is to abstract the form structure into its own method and have that reused within other forms. I think I also need to understand a little more about the power behind the repeater concepts. I've subscribed to the filamentexamples thing that Povilas has just come out with as well that might teach me a few things that are part of the framework that I just simply don't know yet! Here's hoping
Want results from more Discord servers?
Add your server