Meteor自动表单显示电子邮件字段
我已经创建了一个自动表单更新表单,并用文档内容填充该表单。我很难获得自动表单来显示文档中存储的电子邮件地址Meteor自动表单显示电子邮件字段,meteor,meteor-autoform,Meteor,Meteor Autoform,我已经创建了一个自动表单更新表单,并用文档内容填充该表单。我很难获得自动表单来显示文档中存储的电子邮件地址 <template name="edit_user_form"> {{#autoForm schema=schema id="edit_user_form" type="update" collection=Meteor.users doc=selected_user_doc}} <fieldset> {{> a
<template name="edit_user_form">
{{#autoForm schema=schema id="edit_user_form" type="update" collection=Meteor.users doc=selected_user_doc}}
<fieldset>
{{> afQuickField name="profile.first_name"}}
{{> afQuickField name="profile.last_name"}}
{{> afQuickField name="emails"}}
{{> afQuickField name="status" options="allowed" noselect=true}}
{{> afQuickField name="roles" options="allowed" noselect=true}}
<div>
<button type="submit" class="btn btn-primary">Submit</button>
<button type="reset" class="btn btn-default">Reset</button>
</div>
</fieldset>
{{/autoForm}}
</template>
{{{#autoForm schema=schema id=“edit_user_form”type=“update”collection=Meteor.users doc=selected_user_doc}
{{>afQuickField name=“profile.first_name”}
{{>afQuickField name=“profile.last_name”}
{{>afQuickField name=“emails”}
{{>afQuickField name=“status”options=“allowed”noselect=true}
{{>afQuickField name=“roles”options=“allowed”noselect=true}
提交
重置
{{/autoForm}
因此,电子邮件输入字段中填充了“[object object]
”
既然我只允许每个用户发送一封电子邮件,那么告诉AutoForm用电子邮件地址填充表单字段的正确方法是什么?谢谢。是的,在meteor帐户中,电子邮件被视为一个数组。您可以从autoform github的问题中使用:
{{> afQuickField name="emails.0.address"}}