Form builder, any loop view?

In Form Builder, is there anything like Infolist's RepeatableEntry?
8 Replies
atabegruslan
atabegruslanOP4mo ago
otherwise I'll just had to use a plain old forloop
Dennis Koch
Dennis Koch4mo ago
Nope. Forms and Infolists are kept separate so far. Will change a bit in v4
atabegruslan
atabegruslanOP4mo ago
So I went forward with a plain forloop. But, I got a new hurdle that Im stuck on. Pls see in screenshot, Im looping thru all the product variants, inside the loop, I want to utilize $variant, not product_variants.sku. How do you do that? What's the syntax?
No description
nanopanda
nanopanda4mo ago
@atabegruslan Have you looked at the Repeater component? It integrates with a relationship nicely: https://filamentphp.com/docs/3.x/forms/fields/repeater#integrating-with-an-eloquent-relationship
atabegruslan
atabegruslanOP4mo ago
I already tried Filament\Forms\Components\Repeater (like what I stated in the title of this question thread) When I used it, it just prompt me to "add another product variations?", when I already have the product variations generated, and I just need the shopkeeper to fill in the details (price, sku, etc)
toeknee
toeknee4mo ago
So just set the repeater max items count to what you have added. and set deletable(false)
atabegruslan
atabegruslanOP4mo ago
Thanks, I'll take another try Now it works better, now that I know how to use it properly. Thank you
Dennis Koch
Dennis Koch4mo ago
That's a good example of asking what you are trying to achieve, because other people might have a different view onto your problem.
Want results from more Discord servers?
Add your server