title: Meteor Collections and when to use a schema
body: <p>I am starting to build an app and have a collection that is used to create a pet post.</p>
  
  <p>Note: I'm using the following packages to build my collection schemas, Simple Schema <a href="https://atmospherejs.com/aldeed/simple-schema" rel="nofollow">https://atmospherejs.com/aldeed/simple-schema</a></p>
  
  <p>The page that I'm using to insert the data into this particular collection has a section that based on the choice the user makes they are presented with more options.</p>
  
  <p>For example focusing in on one question there are some checkboxes, by default none are selected but if the user selects any checkbox they are given more options to choose from either via checkboxes or text areas. The point is that they will have additional options to choose from based on their selection.</p>
  
  <p>I think the best way to handle how the data is inserted is via the template helpers for that specific section so that's not the question.</p>
  
  <p>Instead where i'm confused is at the collection level and how to Schema that information or if I even need to.</p>
  
  <p>For example let's say you have a question that involves pets.</p>
  
  <p>The question could be: Do you have pets?</p>
  
  <p>The checkbox options could be:</p>
  
  <ol>
  <li>Dogs</li>
  <li>Cats</li>
  <li>Other</li>
  </ol>
  
  <p>By default all of these checkboxes are unchecked but if the user checks any of the boxes then a text area is revealed (again i realize all of this happens at the Template.events and Template.helpers level).</p>
  
  <p>What my real question is, now that I've set the scenario, is how do you store information like that or schema it to allow these kinds of values.</p>
  
  <p>Assuming that all of the functions to grab this data are all on the Template.helpers level so this is simple a question about how to store kind of data in this scenario.</p>
  
  <p>My notion was to do something like this (using the simpleSchema package):</p>
  
  <pre><code>Pet = new SimpleSchema({
   petInstructions: {
    type: String,
    optional: true,
    allowedValues: ['Dogs', 'Cats', 'Other']    
   }
  });
  </code></pre>
  
  <p>However I'm not certain this is right again let me re-iterate that I do want the checkboxes to have the values 'Dogs', 'Cats', 'Other' and the text area when any of these are checked so that the end-user can enter more information about their pets.</p>
  
  <p>What i'm unclear about is if I'm thinking about how this data's Schema could be or how this kind of information should be stored in the MongoDB.</p>
  
  <p>I feel like there should also be a property for the TextArea input, would that be a good way to think about it?</p>
  
  <p>For example (adding on to the example above):</p>
  
  <pre><code>Pet = new SimpleSchema({
       petInstructions: {
        type: String,
        optional: true,
        allowedValues: ['Dogs', 'Cats', 'Other'],
        textArea: ""
       }
      });
  </code></pre>
  
  <p>Should I just leave another property/value for that particular content?</p>
  
  <p>This is somewhat of a granular level question that understanding something simple like this would help clarify other questions I had.</p>
  
  <p>Thank you.</p>