Form builder, any loop view?
In Form Builder, is there anything like Infolist's RepeatableEntry?
8 Replies
otherwise I'll just had to use a plain old forloop
Nope. Forms and Infolists are kept separate so far. Will change a bit in v4
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?@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
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)So just set the repeater max items count to what you have added.
and set deletable(false)
Thanks, I'll take another try
Now it works better, now that I know how to use it properly. Thank you
That's a good example of asking what you are trying to achieve, because other people might have a different view onto your problem.