如何在帐户中添加额外的单身字段

时间:2015-03-12 17:58:49

标签: meteor

我想在我的辉煌默认注册模板中添加更多字段, 雇用我的配置:

 AccountsTemplates.configureRoute('signUp', {layoutTemplate: 'generalLayout'});

1 个答案:

答案 0 :(得分:0)

var pwd = AccountsTemplates.removeField('password');
AccountsTemplates.removeField('email');
AccountsTemplates.addFields([
  {
      _id: "newfield",
      type: "text",
      displayName: "Field Name",
      required: true,
      minLength: 5,
  },
  {
      _id: "username",
      type: "text",
      displayName: "username",
      required: true,
      minLength: 5,
  },
  pwd
]);

inside / lib文件夹或从客户端和服务器可以到达的任何地方