yajra / laravel-datatables-editor

Laravel DataTables Editor Integration.
https://yajrabox.com/docs/laravel-datatables/editor-installation
MIT License
115 stars 14 forks source link

Fill select box options #41

Closed der-ada closed 5 months ago

der-ada commented 4 years ago

Hello!

I have a datatable 'pos' with editor. It is joined via '$this->belongsTo('App\Facility');'. This is working, I can display the name of the facility of that pos refering it by 'facility.name' in DataTables.

But I can't find any useful information on how to setup a selectbox for that field. The selectbox should be filled with all the entries of the field 'facilities.name', getting its value from 'facilities.id', set the 'selected' option of the select box to 'pos.facility_id' and store the value in that same field, when 'save' is clicked.

I am trying to figure this out with https://editor.datatables.net/manual/php/joins but could't get anywhere yet.

Any documentation and / or tutorial for this?

tia & cu, ada

github-actions[bot] commented 5 months ago

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 5 months ago

This issue was closed because it has been inactive for 7 days since being marked as stale.