Displaying information within or next to a form?

I have tabs on an edit resource. One of the tabs has contacts. Ideally I'd like to just have a card for each contact on that tab just for informational purposes. It wouldn't be something that I'd want users to be able to edit, at least not in this particular place. How can I accomplish this? Since it technically lives inside a form, I can't seem to use a TextColumn or anything like that. I'm assuming I'd need some custom html or something?
10 Replies
awcodes
awcodes10mo ago
You could do a custom field, or a view field or even just a placeholder field.
Jon Mason
Jon Mason10mo ago
was just reading through that now...maybe that's what I need. I don't want an actual input though, even if it's disabled, I literally just want to display some data. Was also thinking if I built a livewire component maybe I could include that...I have yet to do anything custom with filament, just trying to get my mind around it as of right now.
awcodes
awcodes10mo ago
Placeholder sounds like it might be what your after. You can use it to display info that isn’t a form field and won’t be included in the form data.
Jon Mason
Jon Mason10mo ago
ok cool, I'll dig into that, thx!
awcodes
awcodes10mo ago
And the View, unlike ViewField, will do the same thing as placeholder if you need a more complex render. So placeholder for simple value display. And View for rending a blade component for more complex things. ViewField for rendering more complex components that need to be part of the form data. If that makes sense. Lol.
Jon Mason
Jon Mason10mo ago
that totally makes sense. Sounds like the View component is what I'm wanting for this since I'd like to use some more custom design.
Horia
Horia8mo ago
@awcodes I am in the same situation, but I want to display a set of values, and all are calculated based on some fields in the form. If I use a custom view, the values are not displayed correctly. After each change in the form fields, the value displayed is the one corresponding to the old value of the form field. Am I missing something here?