Are nested repeateble fields possible?
I would need to do something like this (or even more deeply nested). How to do it? Is there a special component for this?
14 Replies
I have checked it, but there is nothing about nesting.
The docs mention only one level of nesting. I need 2 or 3.
I want also reuse my existing tables.
If that's not possible and only 1 level of nesting is possible, that's ok.
But it would be a shame if it wasn't possible out-of-the-box somehow.
Why don't you just try it?
So, is it possible?
I am watching Filament tutorial right now.
And they stopped at level 1
the docs doesn't mention anything about multiple nested levels
Is it possible? Can you do multiple levels of nesting using your existing tables/models and pivot tables? Have you done it in any of your projects?
Not 100% sure. Try and see whether it works π€·ββοΈ
I gues it should work.
A dumb guess is they would promote the heck out of it it would work. It's not so easy to implement by the way. I am using such thing myself in my app, but it's not the cleanest thing. That's why I was interesting in this thing. But it seems that it's missing.
Again, they would market the shit out of this feature if it was there.
So, my guess based on my life experience is that if you don't market such a good feature, it's not there π
I might be wrong. But the chance of it being not out-of-the-box feature is more likely.
perhaps there is some 3rd party component to acheive that?
There shouldn't be an issue in nesting Repeaters as your screenshot show. I am not sure how the support for relationships is.
Not sure whether I'd use 3 levels of Repeater though. 2 levels is already hard to graps visually
There are cases when it makes sense.
Let's say, we will use a gamification like scenario. Think of some frankenstein-creature builder: level 0. is whole body (head, arm, leg, chest, ...) 1. level is is arm - in arm you have level 2. where is shoulder, forearm, hand, etc. and 3. level is fingers. 4. level is phalanges of a finger. And remember we are building a frankenstein, that can have two left arms, three left hands and 3 fingers and each of them have different number of phalanges. And each user can build its own Frankenstein. Obviously, this is for illustration. In my app I have real life atomization and it works great from the UI perspective. But the backend code is complicated. That's why I was thinking that perhaps Filament have solved the unlimited nesting of repeaters elegantly and it's offered out of the box.
That's why I was thinking that perhaps Filament have solved the unlimited nesting of repeaters elegantly and it's offered out of the box.As I said: Try it out π
Yes it's possible. I'm using multiple levels of nested Builder and Repeater, no issues.
Unless you are trying to use nested relationship repeaters it should work just fine
Great news! I will trye it then. Is there any tutorial or article on how to do that?
It's very simple. Do you know how to add a single Repeater field to your form?
i had also done same it saves data but when edit it will not prepopulated do u know how?