3

Is it possible to use the table settings? I was able to add a table field, but after pressing the Add Value and Trash nothing happens. Save button saves NULL in column value in database.

field in settings table:

{ "name":"value", "label":"Value", "type":"table", "columns":{"name":"Name", "desc":"Desc", "price":"Price"}, "max":"5", "min":"0" }

and with entity_singular:

{ "name":"value", "label":"Value", "type":"table", "entity_singular":"price", "columns":{"name":"Name", "desc":"Desc", "price":"Price"}, "max":"5", "min":"0" }
neuroine
  • 174
  • 2
  • 19

1 Answers1

0

Your code works for me perfectly in the latest Backpack. You could try:

1) checking if there are any javascript errors on page (that stop the table from working properly);

2) a composer update to get the latest version;

tabacitu
  • 6,047
  • 1
  • 23
  • 37
  • 1) I have only one error: http://localhost:8000/vendor/adminlte/plugins/daterangepicker/daterangepicker-bs3.css Failed to load resource: the server responded with a status of 404 (Not Found) 2) nothing has changed I guess that some asset isn't loaded at all. Perhaps, important is that I upgraded laravel from 5.2 and backpack. – neuroine Oct 10 '16 at 20:41
  • Ok. That error has nothing to do with it, you're right. Can you try a ```composer update```? The table field functionality has had some fixes pushed in the past 2 weeks. – tabacitu Oct 11 '16 at 10:19
  • composer update Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Generating autoload files > Illuminate\Foundation\ComposerScripts::postUpdate > php artisan optimize Generating optimized class loader – neuroine Oct 11 '16 at 23:23
  • As I mentioned before [link] (http://stackoverflow.com/questions/39944912/laravel-backpack-settings-table-field-in-settings/39951837#comment67212729_39951837) nothing has changed – neuroine Oct 11 '16 at 23:26
  • Ok, if you have published and/or overwritten the CRUD blade files you might need to pull those in again from the package, as explained here: https://github.com/Laravel-Backpack/CRUD/issues/172#issuecomment-252546743 – tabacitu Oct 12 '16 at 11:30
  • Manually update : resources/view/vendor/backpack/crud/create.blade.php resources/view/vendor/backpack/crud/edit.blade.php resources/view/vendor/backpack/crud/form_content.blade.php resources/view/vendor/backpack/crud/fields/table.blade.php – neuroine Oct 12 '16 at 14:14