【发布时间】:2016-06-14 14:56:04
【问题描述】:
我搜索了高低,我见过的最好的是this example using afQuickField。我真的不想创建“特殊”模式只是能够在使用 AutoForm 和 SimpleSchema 创建新 Meteor 用户时提交电子邮件。
使用 AutoForm 创建表单的确切方法是什么,我可以通过调用 Meteor.createUser() server-side 在 Meteor 中手动创建新用户?
我了解如何在提交时使用表单挂钩...如何使用 afArrayField...但我只想从使用 afFormGroup 的表单中传递 emails.$.address 的值...如何??
我试过了……
{{> afFormGroup name="emails[0].address" type="text" label=false placeholder="schemaLabel" formgroup-class="o-group"}}
{{> afFormGroup name="emails.[].address" type="text" label=false placeholder="schemaLabel" formgroup-class="o-group"}}
{{> afFormGroup name="emails.$.address" type="text" label=false placeholder="schemaLabel" formgroup-class="o-group"}}
{{> afFormGroup name="emails.address" type="text" label=false placeholder="schemaLabel" formgroup-class="o-group"}}
...一切都无济于事。看起来这很常见,应该很简单。
{{> afFormGroup name="emails" type="text" label=false placeholder="schemaLabel" formgroup-class="o-group"}}
当我使用链接和上面最后一个示例中的模式提交时,我收到一条错误消息,指出“电子邮件必须是一个数组”。
【问题讨论】:
标签: javascript meteor meteor-autoform