如何使用自动表单显示选项

How to show options with autoform

我已将选项添加到我的架构中,但 autofrom 未显示这些选项。

我的架构:

BetaSignups = new Mongo.Collection("BetaSignups");

BetaSignups.attachSchema(new SimpleSchema({
  segment: {
    type: String,
    label: "Segmento",
    allowedValues: ["college", "highschool", "professional"],
    autoform: {
      options: [
        {label: "Ensino superior", value: "college"},
        {label: "Ensino médio e pré-vestibular", value: "highschool"},
        {label: "Educação profissional", value: "professional"}
      ]
    }
  },
  name: {
    type: String,
    label: "Nome",
    max: 200
  }, ...

我添加了表格:

<template name="insertbetasignups">
  {{> quickForm collection="BetaSignups" id="insertbetasignups" type="insert"}}
</template>

并且缺少选项,仅显示标签:

我正在使用以下软件包:

meteor-platform
materialize:materialize
aldeed:collection2
alanning:roles
coffeescript
meteorhacks:flow-router
tap:i18n
aldeed:autoform
ongoworks:security

我添加了一个 server/security.js 文件:

BetaSignups.permit(['insert']).apply();

错误在我的设置中,我忘记将此 js 添加到客户端库以配置 autoform-materialize 包。

AutoForm.setDefaultTemplate('materialize');