# List of Values

For field type combobox it's possible to define the result set on the dataSource property directly or to avoid repetition the framework allow you to create the list of values on a specific file located at meta/combos.json.

Here is an example.

[
  "categories": {
    "sql": "SELECT id, title FROM category ORDER BY id ASC",
    "cache": {
      "active": true
    }
  }
}

On the field the configuration would be like this:

 {
    "fieldKey": "category_id",
    "type": "combobox",
    "dbType": "text",
    "label": "Categories",
    "dataSource": {
      "cache": "categories"
    }
},

Last Updated: 10/19/2023, 11:27:49 PM