我有这个 schema.yml
Region:
columns:
name: { type: string(255), notnull: true, unique: true }
options:
symfony: { form: false, filter: false }
Province:
columns:
id: { type: string(2), notnull: true, primary: true }
name: { type: string(255), notnull: true, unique: true }
region_id: { type: integer, notnull: true }
relations:
Region: { local: region_id, foreign: id, onDelete: CASCADE, foreignAlias: Provinces }
options:
symfony: { form: false, filter: false }
City:
columns:
id: { type: string(4), notnull: true, primary: true }
name: { type: string(255), notnull: true, unique: true }
province_id: { type: string(2), notnull: true }
latitude: { type: decimal, scale: 6, size: 8, notnull: true }
longitude: { type: decimal, scale: 6, size: 8, notnull: true }
relations:
Province: { local: province_id, foreign: id, onDelete: CASCADE, foreignAlias: Cities }
options:
symfony: { form: false, filter: false }
我想制作一个使这些字段相互关联的表格:我在下拉菜单中选择地区,然后在下一个下拉菜单中我可以在所选地区的省份之间进行选择,然后在最后一个下拉菜单中我只能看到之前选择的省市。
我不知道如何做到这一点......你能帮帮我吗?