Answers.Body: <p>I think you need to loop all entries of that sections to "collect" them.</p>
  
  <pre><code>{% set cocktailTypes = [] %}
  {% for entry in craft.entries.section('mySection') %}
      {% set cocktailTypes = cocktailTypes|merge([entry.cocktails]) %}
  {% endfor %}
  
  {% for cocktailType in cocktailTypes|sort %}
      &lt;p&gt;{{ cocktailType }}&lt;/p&gt;
  {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-30T09:04:52.310Z
Answers.LastActivityDate: 2015-10-30T09:04:52.310Z
Answers.UserDisplayName: carlcs
Body: <p>I can get a list of option labels available in a dropdown field using the code below.  Is there a way to get a list of option labels that have been assigned to entries in a specific section? </p>
  
  <pre><code>{% for cocktailTypes in craft.fields.getFieldByHandle('cocktails').getFieldType.options %}
      &lt;p&gt;{{ cocktailTypes.label }}&lt;/p&gt;
  {% endfor %}
  </code></pre>
  
Tags: <fieldtypes><drop-down>
Title: Find Dropdown Option Labels That Are Assigned in a Section
ThreadText: # Find Dropdown Option Labels That Are Assigned in a Section
  
  (Asked by: username_0 on 2015-10-28)
  
  I can get a list of option labels available in a dropdown field using the code below. Is there a way to get a list of option labels that have been assigned to entries in a specific section?
  
  ```
  {% for cocktailTypes in craft.fields.getFieldByHandle('cocktails').getFieldType.options %}
      <p>{{ cocktailTypes.label }}</p>
  {% endfor %}
  
  ```
  
  **Tags:** fieldtypes, drop-down
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-10-30. Score: 1
  
  I think you need to loop all entries of that sections to "collect" them.
  
  ```
  {% set cocktailTypes = [] %}
  {% for entry in craft.entries.section('mySection') %}
      {% set cocktailTypes = cocktailTypes|merge([entry.cocktails]) %}
  {% endfor %}
  
  {% for cocktailType in cocktailTypes|sort %}
      <p>{{ cocktailType }}</p>
  {% endfor %}
  
  ```
  
  
  ---
  
  