Answers.Body: <p>After I posted my question I ended up coming with something that works:</p>
  
  <pre><code> {% for entry in craft.entries.section('Vegetables') if entry.Vitamins.contains('a') %}
        &lt;p&gt;&lt;a href="{{ entry.url }}"&gt;{{ entry.title }}&lt;/a&gt;&lt;/p&gt;
   {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-06T15:49:35.267Z
Answers.Text: While this approach works, it seems like we should be able to use the native search() methods and syntax to find entries having checkbox field options checked.
Answers.UserDisplayName: Roger Glenn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-30T20:40:34.330Z
Answers.LastActivityDate: 2015-06-30T20:40:34.330Z
Answers.UserDisplayName: triplethreat23
Answers.Body: <p>I posted a similar question the other week, I managed to figure it out and I posted my code. Hope it helps:</p>
  
  <p><a href="https://craftcms.stackexchange.com/questions/10321/filter-based-search-form/10370">Filter based Search Form</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-30T22:07:04.800Z
Answers.LastActivityDate: 2015-06-30T22:07:04.800Z
Answers.LastEditDate: 2017-04-13T12:51:00.200Z
Answers.UserDisplayName: Jason Mayo
Answers.Body: <p>While the approach above works this is how you'd construct a string to use with <code>craft.entries.search()</code> when you have multiple checkbox fields. The benefit is being able to order entries by relevancy/score.</p>
  
  <pre><code>{% set string = '' %}
  
  {% if craft.request.getParam('outcomes') | length %}
      {% for outcome in craft.request.getParam('outcomes') %}
          {% set string = string ~ ' outcomes:' ~ outcome %}
      {% endfor %}
  {% endif %}
  
  {% if craft.request.getParam('age') | length %}
      {% for age in craft.request.getParam('age') %}
          {% set string = string ~ ' age:' ~ age %}
      {% endfor %}
  {% endif %}
  
  {% if string != '' %}
      {% set entries = craft.entries.section('interventions').search(string).order('score') %}
  {% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-06T16:15:11.477Z
Answers.LastActivityDate: 2015-10-06T17:45:31.737Z
Answers.LastEditDate: 2015-10-06T17:45:31.737Z
Answers.UserDisplayName: Roger Glenn
Body: <p>I apologize if this question has been asked before. I'm new at this and am struggling to figure out if what I need to do is possible/the right way to do it or if I need to structure my content differently.</p>
  
  <p>My entries in a section have a field that use a checkbox field type. I would like to display entries that have a matching value based on that field.</p>
  
  <p><strong>Example:</strong>
   Field: Vitamins,</p>
  
  <pre><code>  Field Type: Checkboxes
                Option: Vitamin A  | Value: a
                Option: Vitamin B  | Value: b
                Option: Vitamin C  | Value: c
  
  Section: Vegetables
  
   -Entry: Broccoli
         Vitamins Field Values: a, c
  
   -Entry: Corn
         Vitamins Field Values: a, b
  
   -Entry: Squash
         Vitamins Field Values: a, b, c
  </code></pre>
  
  <p>I'm trying to figure out how to display all entries that contain Vitamin A.</p>
  
Tags: <entries>
Title: Display entries with matching checkbox field values
ThreadText: # Display entries with matching checkbox field values
  
  (Asked by: username_0 on 2015-06-30)
  
  I apologize if this question has been asked before. I'm new at this and am struggling to figure out if what I need to do is possible/the right way to do it or if I need to structure my content differently.
  
  My entries in a section have a field that use a checkbox field type. I would like to display entries that have a matching value based on that field.
  
  **Example:**
  Field: Vitamins,
  
  ```
    Field Type: Checkboxes
                Option: Vitamin A  | Value: a
                Option: Vitamin B  | Value: b
                Option: Vitamin C  | Value: c
  
  Section: Vegetables
  
   -Entry: Broccoli
         Vitamins Field Values: a, c
  
   -Entry: Corn
         Vitamins Field Values: a, b
  
   -Entry: Squash
         Vitamins Field Values: a, b, c
  
  ```
  
  I'm trying to figure out how to display all entries that contain Vitamin A.
  
  **Tags:** entries
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_0 on 2015-06-30. Score: 3
  
  After I posted my question I ended up coming with something that works:
  
  ```
   {% for entry in craft.entries.section('Vegetables') if entry.Vitamins.contains('a') %}
        <p><a href="{{ entry.url }}">{{ entry.title }}</a></p>
   {% endfor %}
  
  ```
  
  > **Comments:**
  > **username_1**: While this approach works, it seems like we should be able to use the native search() methods and syntax to find entries having checkbox field options checked.  
  
  ---
  
  ### Answer by username_2 on 2015-06-30. Score: 1
  
  I posted a similar question the other week, I managed to figure it out and I posted my code. Hope it helps:
  
  [Filter based Search Form](https://craftcms.stackexchange.com/questions/10321/filter-based-search-form/10370)
  
  
  ---
  
  ### Answer by username_1 on 2015-10-06. Score: 1
  
  While the approach above works this is how you'd construct a string to use with `craft.entries.search()` when you have multiple checkbox fields. The benefit is being able to order entries by relevancy/score.
  
  ```
  {% set string = '' %}
  
  {% if craft.request.getParam('outcomes') | length %}
      {% for outcome in craft.request.getParam('outcomes') %}
          {% set string = string ~ ' outcomes:' ~ outcome %}
      {% endfor %}
  {% endif %}
  
  {% if craft.request.getParam('age') | length %}
      {% for age in craft.request.getParam('age') %}
          {% set string = string ~ ' age:' ~ age %}
      {% endfor %}
  {% endif %}
  
  {% if string != '' %}
      {% set entries = craft.entries.section('interventions').search(string).order('score') %}
  {% endif %}
  
  ```
  
  
  ---
  
  