I have added options to my Schema but autofrom is not showing the options.
My Schema:
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
}, ...
I added the form with:
<template name="insertbetasignups">
{{> quickForm collection="BetaSignups" id="insertbetasignups" type="insert"}}
</template>
And the options are missing, it shows only the label:
I'm using the following packages:
meteor-platform
materialize:materialize
aldeed:collection2
alanning:roles
coffeescript
meteorhacks:flow-router
tap:i18n
aldeed:autoform
ongoworks:security
I have added a server/security.js file with:
BetaSignups.permit(['insert']).apply();
The error was in my setup, I forgot to add this js to client lib for configuring the autoform-materialize package.
AutoForm.setDefaultTemplate('materialize');