Hello!
I have a collection (‘locales’) with a field of countries which contain a list of provinces/states.
I wonder if it is possible to select a country and based on that get a list of its states and be able so select one.
This is how looks my config so far, but i haven’t been able to do such a thing
collections:
- label: "Locales"
name: "locales"
folder: "public/data/locales/"
create: true
identifier_field: "country"
format: "json"
fields:
- { label: "Country", name: "country", widget: "string" }
- label: "Provinces/States"
name: "provinces"
widget: "list"
required: false
fields:
- { label: "Province/State", name: "province", widget: "string" }
- label: "Platform"
name: "platform"
folder: "public/data/platforms"
create: true
identifier_field: "name"
format: "json"
fields:
- { label: "Name", name: "name", widget: "string" }
- label: "Country"
name: "country"
widget: "relation"
collection: "locales"
search_fields: ["country"]
display_fields: ["country"]
value_field: "country"