Meteor Autoforms に問題があり、フォームが正しくレンダリングされません。
私のコードはここにあります:
<template name="insertBookForm">
{{> quickForm id="fields1" collection="FieldsExamples" schema=Schemas.FieldsExamples }}
</template>
FieldsExamples = new Mongo.Collection("fieldsExamples");
var Schemas = {};
Schemas.FieldsExamples = new SimpleSchema({
name: {
type: String
},
phone: {
type: String,
optional: true
},
address: {
type: Object
},
'address.street': {
type: String
},
'address.street2': {
type: String,
optional: true
},
'address.city': {
type: String
},
'address.state': {
type: String,
allowedValues: ["AL","AK","AZ","AR","CA","CO","CT","DE","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY"],
autoform: {
afFieldInput: {
firstOption: "(Select a State)"
}
}
},
'address.postalCode': {
type: String,
label: "ZIP"
},
contacts: {
type: Array,
optional: true
},
'contacts.$': {
type: Object
},
'contacts.$.name': {
type: String
},
'contacts.$.phone': {
type: String
}
});
これは、サイトhttp://autoform.meteor.com/qfdetailsから取得した単純な例です
私が得るものはこれです:
ただし、コレクションにデータを入力するのは正常なはずです