0
でフィールドの値を取得する:予想通り流星 - 私は、次のスキーマ持っオートフォームおよびコレクション2
GuestSchema = new SimpleSchema({
name: {
type: String,
label: 'Name'
}
code: {
type: String,
label: 'Code',
autoValue: function(){
return AutoForm.getFieldValue('name', 'insertGuestForm');
},
autoform: {
type: 'hidden'
}
}
});
<template name="NewGuest">
<div class="new-guest">
{{> quickForm collection="Guests" id="insertGuestForm" type="insert" class="new-guest-form"}}
</div>
</template>
しかしAutoForm.getFieldValue
が動作していません。私はname
のフィールド値を取得し、プロパティcode
と私のDBにそれを保存したいと思います。