Fields Empty on View Page

I must be missing something really obvious, but I've searched everywhere and cannot find the answer. I have view pages that are showing read only versions of the edit page, however, if my model has a belongsTo or hasOne, it isn;'t showing the values until I click on edit and they suddenly appear. I have read in the docs, that By default, the View page will display a disabled form with the record’s data, and I have added the view page recently with make:filament-page ViewUser --resource=UserResource --type=ViewRecord command. Am I missing something or should I be using the infolist instead ?
Solution:
If you are clicking edit and it loads then it sounds to me like the page is not form->Fill([]) ing... can you provide your view page code?
Jump to solution
3 Replies
Solution
toeknee
toeknee3d ago
If you are clicking edit and it loads then it sounds to me like the page is not form->Fill([]) ing... can you provide your view page code?
Fatherdeadx
FatherdeadxOP2d ago
Doh, you are spot on, but it was the other way around, I'd added code to the edit screen to fill from the hasone records and forget about the view. You gave me a good pointer.
toeknee
toeknee2d ago
No problem, glad to hear you solved it!

Did you find this page helpful?