0

我已將選項添加到我的模式,但autofrom未顯示選項。如何使用autoform顯示選項

我的架構:

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> 

和選項的缺失,它僅顯示標籤: enter image description here

我使用以下套餐:

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

我已經添加了服務器/ security.js文件:

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

我試過與你提供的問題相同。它對我來說非常好...... – iamhimadri

+0

只是一個盲目的猜測:嘗試添加'選項=「允許」'快速形成。 –

+0

試用選項=「允許」,仍然是同樣的問題.. – canesin

回答

0

錯誤是在我的設置,我忘了補充這個js客戶lib中配置了自動-兌現包。

AutoForm.setDefaultTemplate('materialize'); 
相關問題