2015-06-20 14 views
0

我有一個包含對象的陣列,並且與數組字符串的自動窗體:自動窗體陣列顯示無場(initialCount)

# Schema 
misc: 
    type: Array 
    label: "Something" 
    optional: true 
"misc.$": 
    type: String 
    optional: true 

最初我想不顯示形式。只需「+」 - 按鈕。我在我的模板中使用這個:

+autoForm collection="Collections.UserProfiles" id="updateProfileForm" type="update" doc=this class="form-horizontal" 
+afQuickField name="misc" template="bootstrap3-horizontal" initialCount=0 

我已經嘗試在模式中使用initialCount = 0。

回答

0

好的,我剛剛發現它是如何工作的。不好意思問,但也許有人有同樣的問題。只需像這樣指定你的模式。它也適用於對象數組。

misc: 
    type: Array 
    label: "Something" 
    optional: true 
    autoform: 
     initialCount: 0 
"misc.$": 
    type: String 
    optional: true 

仍然我不知道爲什麼我沒有工作將其設置在模板中。因爲那就是它在autoform文檔中解釋的方式。