Instead of a text field, I'd like to add a dropdown to Value field in Laravel-Backpack/Settings, admin/setting/10/edit
page. I appreciate any suggestions.
I used the following in DB settings field but it gives an error.
{"name":"value","label":"Value", "title":"Lightbox" ,"type":"select_from_array",
"options":{"lightbox":"lightbox","colorbox1":"colorbox1"}
Error
ErrorException in Fields.php line 28: Undefined index: name in Fields.php line 28 at HandleExceptions->handleError('8', 'Undefined index: name', '/Users/sokada/Code/backpack-ceci/vendor/backpack/crud/src/PanelTraits/Fields.php', '28', array('field' => array(), 'form' => 'both', 'complete_field_array' => array())) in Fields.php line 28 at CrudPanel->addField(array()) in SettingCrudController.php line 69
Line #28 in Fields.php is followings.
...
// if the label is missing, we should set it
if (! isset($complete_field_array['label'])) {
$complete_field_array['label'] = ucfirst($complete_field_array['name']);
}
...