0

我已经在我的架构中添加了选项,但 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();
4

1 回答 1

0

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

AutoForm.setDefaultTemplate('materialize'); 
于 2015-07-23T13:46:56.437 回答