Add custom fieldtype in keystone.js
I am trying to add a hidden fieldtype called 'admin' which just has the user id of the person creating the model item. This works fine locally but for some reason doesn't work on a server. Here is what I did, maybe it is because I modified a file inside keystone/lib? /Models/Group.js var keystone = require('keystone'), Types = keystone.Field.Types; /** * Group Collection Model * ============= */ var Group = new keystone.List('Group'); Group.add({ name: { type: String, required: true, initial: true }, createdAt: { type: Date, default: Date.now }, groupId: { type: Types.Admin, required: true,