我已经向“模式”添加了选项,但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
我已添加服务器/安全性。js文件,包含:
BetaSignups.permit(['insert']).apply();