<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>

CC BY-SA 3.0
2015-10-30T09:04:52.310Z
2015-10-30T09:04:52.310Z
carlcs
<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>

<fieldtypes><drop-down>
Find Dropdown Option Labels That Are Assigned in a Section
# 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 %}
    {{ cocktailTypes.label }}
{% 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 %}
    {{ cocktailType }}
{% endfor %}


---

