Autoform-picker - AutoForm plugin which allow to pick (or create new) document from given Mongo Collection

A few days ago I have released autoform-picker package which allow to pick document from large Meteor collection.

Actually it was created as alternative to aldeed:autoform-select2, but it has a few differences:

  1. Do filtering on server, what helps to work with big collections (no need to subscribe to all collection).
  2. Allow to add new document into collection when it missing.

More information here: https://github.com/nous-consulting/autoform-picker

Hope it can be useful for someone else. Any your feedback is always welcome.

I am looking for something like this right now, will have a try and give you some feedback. Thanks for that.

Just one thing I’d like to point out: like it was already said here, it is better that you write the package’s documentation in plain JavaScript. It makes easy for those (like me) who doesn’t use CoffeeScript and remains perfectly accessible to those who use.

1 Like

Good point about JavaScript docs. Will update them.

If you’ll have any problems using package, please let me know here or report an issue into GitHub.

Is it possible embedded the object instead only the id?

@ricardodovalle , could you elaborate your need?

@chompomonim, I have the below schema and I would like to store all chosen person inside a event.
At now, I am create the form using Select2, but I would like to use AutoForm instead hand-make form. Is it possible using autoform-picker? Thanks.

PersonSchema = new SimpleSchema({
  name: { type: String }
});
EventSchema = new SimpleSchema({
  people: { type: [PersonSchema] }
});

In case somebody used my widget, I just released new version of it. Now it’s written in JavaScript and supports Meteor 1.3

Attention!!! Package was renamed into nous:autoform-picker:

Additionally I created simple search package which supports transliteration:

Example project is here:

Yes, it’s totally possible, please read documentation here: https://github.com/nous-consulting/autoform-picker

You will need to register your Person collection, and then in EventSchema:

people_ids: {
    type: [String],
    regEx: SimpleSchema.RegEx.Id,
    autoform: {
      type: "toic-picker",
      afFieldInput: {
        collection: 'Person',           // Collection name
        choose: ()=> function () { return this.name }, 
      }
    }
  }