zenben1126 zenben1126 - 1 year ago 110
Javascript Question

How do I extend User model in Meteor?

I have been researching this for ages and cannot find a clear explanation. My meteor app has user accounts installed and logging in/out is all working just fine. However, I'd like to add some optional fields to my users, such as age, gender, etc. How do I go about doing this? Please note, I am new to Meteor so please be explicit.

Answer Source

To add more fields to the user registration form provided by useraccounts packages, see Form Fields Configuration section of the official Guide

Supposing you want to add a gender field to the registration form, you could do something like this

  _id: "gender",
  type: "select",
  displayName: "Gender",
  select: [
      text: "Male",
      value: "male",
      text: "Female",
      value: "female",
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download