sleeping-owl / admin

Administrative interface builder for Laravel
http://sleeping-owl.github.io/
MIT License
504 stars 259 forks source link

Model select within form display within tabbed display is empty #291

Open nschirmer opened 8 years ago

nschirmer commented 8 years ago

Hi,

This is for latest development branch.

I've got a tabbed display for my App\User page. Within one of the tabs, I am including a form display for an App\Job relationship. This form display works fine when I'm on the actual /admin/jobs/{id}/edit page, but when it's included within the users tab, the select input is not populating.

The select input is for a model: FormItem::select('status_id', 'Current Status')->model('App\JobStatus')->display('status')

The dropdown is empty on the users tab, but not on the solo edit job page. I have two of these dropdowns, both for different models, and both are empty on there. Any idea what might cause this?

Thanks.

xoco70 commented 8 years ago

+1

xoco70 commented 8 years ago

You have to add ->display('estadodsc') where estadodsc is the field name in your db that you want to display

nschirmer commented 8 years ago

@xoco70 Yes, I included that in my OP.