title: How to populate autoForm select with values from collection in Meteor?
body: <p>I just found this awesome autoForm package for Meteor and I want to use it together with select2.</p>
  
  <p>My goal is to use the autoForm to easily create an input form for one of my collections. The obstacle is: how do I populate it with fields from another collection and how do I make it multi-select?</p>
  
  <p>Inside my lib/collections I declare a Meteor collection:</p>
  
  <pre><code>Clients = new Mongo.Collection('clients');
  Clients.attachSchema(new SimpleSchema({
      clientName: {
          type: String,
          label: "Mandator Name",
          max: 200
      }
  }));
  </code></pre>
  
  <p>Now I don't get the documentation on autoForm. On the atmospherejs page (<a href="https://atmospherejs.com/aldeed/autoform" rel="nofollow">https://atmospherejs.com/aldeed/autoform</a>) I am supposed to use something like this if I am not wrong:</p>
  
  <pre><code>{{#autoForm collection="Clients" id="insertClientForm" type="insert"}}
      {{&gt; afFieldInput name="clientName" options=options}}
  {{/autoForm}}
  </code></pre>
  
  <p>And then write some JS like this:</p>
  
  <pre><code>Template.registerHelper({
      options: function() {
          return Clients.find({}, {fields: {clientName: 1}});
      }
  });
  </code></pre>
  
  <p>The template is rendered alright, as in I can see an input box. However it is not a multi-select and it does not allow me to select any values at all.</p>
  
  <p>Any ideas on where the issue is?</p>
  
  <p><strong>Bonus question</strong>: How do I use select2 on autoForm generated select inputs?
  <strong>EDIT</strong>: Use aldeed:autoform-select2 to use select2.</p>