title: Meteor dynamic form generation
body: <p>I have a survey form I would like an admin to be able to add more questions to on the fly. The way I'm thinking of doing this is to have the admin add questions to a Questions collection with several properties e.g:</p>
  
  <pre><code>{
      "description" : "desc",
      "fieldType" : "textField",
      "sortOrder" : 1,
      "dataType" : "text",
      "_id" : "eFopP8XFgY8Br93fA"
  }
  </code></pre>
  
  <p>and then on the client side, loop through these using an #each block and a dynamic template like so:</p>
  
  <pre><code>{{#each questions}}
    {{&gt;Template.dynamic template=fieldType}}
  {{/each}}
  </code></pre>
  
  <p>Now the "fieldType" field would correspond to the name of a stored template e.g</p>
  
  <pre><code>&lt;template name="textField"&gt;
      &lt;div&gt;
          &lt;input id="{{_id}}" type="{{dataType}}" class="validate"&gt;
          &lt;label for="{{_id}}"&gt;{{description}}&lt;/label&gt;
      &lt;/div&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p>and inside these templates would have different input fields depending on the type.</p>
  
  <p>I have two issues:</p>
  
  <ol>
  <li>Is this a good way to go about this problem? </li>
  <li>If it is, how would you be able to get the values of these input fields when saving the answers (as we don't know what fields could be there at compile time)</li>
  </ol>