在quickForm SimpleSchema中实现逻辑嵌套选择

时间:2016-02-08 05:15:38

标签: meteor quickform

Property.attachSchema(new SimpleSchema({
  'LGA': {
    label: "L.G.A",
    type: String,
    allowedValues:
    ["Aba","Oha", "Enu"],
    autoform: {
        afFieldInput: {
          firstOption: "(Pls, Select the L.G.A)"
        }
    }
  }
,
'Town': {
  label: "Town",
  type: String,
  allowedValues:
  ["Abakpa","Ewula", "Ezeoka", "Ubu","Echa", "Onu" ,"Eke", "Afor"],
  autoform: {
    afFieldInput: {
      firstOption: "(Pls, Select the Ward)"
    }
    }
  }

});

我有上面的架构,我使用quickForm来实现这个架构。 " Abakpa"," Ewula"," Ezeoka"是" Aba" LGA" Ubu"," Echa"," Onu"是" Oha" LGA和" Eke"," Afor"属于" Enu" LGA。这只是为了说明,因为列表非常多。我想要一个如果" Aba"如果选择了,则可用于城镇选择字段的选项将是" Abakpa"," Ewula"," Ezeoka"。如果选择了Oha,那么" Ubu"," Echa"," Onu"将是Town架构中的下一个选项等。请问我该如何实现?谢谢。

0 个答案:

没有答案