Infolist or widgets in forms

Can we add info lists into forms? I want to put it specifically into a form because I want to place it inside a tab.
Solution:
Right now you can’t put them in forms. Although you’re not the first to be able to expect to do it.
Jump to solution
8 Replies
Patrick Boivin
I haven't tried yet but I get the impression it should be possible. Are you running into any issues? You'll need to wrap it in its own Livewire component
Solution
awcodes
awcodes2y ago
Right now you can’t put them in forms. Although you’re not the first to be able to expect to do it.
Patrick Boivin
I'm guessing the issue will be the typical thing with actions and nested <form> tags right? But it should be possible to embed a simple infolist that just displays information.
awcodes
awcodes2y ago
I agree. Dan’s still thinking it over. But the original intent of info lists was to provider a better view page.
DivDax
DivDax2y ago
I tried using infolists within a form as well, but I couldn't get it to work. 😄 Table -> ViewAction -> form -> infolist
Patrick Boivin
Yeah you're kind of deep in the woods there, it's not the best place to experiment 😅 Maybe a simple View component with a custom Blade view?
Ashk
Ashk14mo ago
a
Nijholt
Nijholt13mo ago
I'm trying to get it to work as well. I was trying something like:
Components\Group::make(fn($livewire) => [
Infolist::make($livewire)
->schema([ Infolists\Components\TextEntry::make('product.name')
->label('Product name'),
])
])
Components\Group::make(fn($livewire) => [
Infolist::make($livewire)
->schema([ Infolists\Components\TextEntry::make('product.name')
->label('Product name'),
])
])

Did you find this page helpful?