Answers.Body: <pre><code>{% for option in entry.dropdownFieldHandle.options %}
      &lt;li&gt;{{ option }}&lt;/li&gt;
  {% endfor %}
  </code></pre>
  
  <p>That should be it :)</p>
  
  <pre><code>{% for entry in craft.entries.section('sectionname') %}
    {% for option in entry.dropdownFieldHandle.options %}
      &lt;li&gt;{{ option }}&lt;/li&gt;
    {% endfor %}
  {% endfor %}
  </code></pre>
  
  <p>Use the above if it is only one page</p>
  
  <pre><code>{% set myArray = [] %}
  
  {% for entry in craft.entries.section('sectionname') %}
    {% for option in entry.dropdownFieldHandle.options %}
          {% set value = option %}
  
          {% set myArray = myArray|merge([value]) %}
    {% endfor %}
  {% endfor %}
  </code></pre>
  
  <p>And loop over that variable , better to load 1 variable as array if you need it over multiple pages. Just make sure all pages have access to this variable (or create a macro for it)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-07T14:33:18.663Z
Answers.Text: also if you want the fields in general use the following:
  
  `{% set dropdown = craft.fields.getFieldByHandle('season') %}
  
  {% for option in dropdown.options %}
   {{ option }}
  {% endif %}`
Answers.UserDisplayName: mike-orez
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-07T15:01:05.990Z
Answers.Text: I'd guess you meant the last `{% endif %}` to be a `{% endfor %}`, but even then craft gives me the error that there is no scope called "options".
Answers.UserDisplayName: justussimon91
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-07T15:36:47.127Z
Answers.Text: I edited my answers, one of the solutions should work.
Answers.UserDisplayName: mike-orez
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-08T07:37:37.677Z
Answers.Text: Your first code snipped does not produce any output at all for me. The second does, but outputs every season as often as there are entries in the section I chose for `'sectionname'` instead of just once as required. Still appreciated :)
Answers.UserDisplayName: justussimon91
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-08T07:48:38.183Z
Answers.Text: I got it solved by just limiting the `for entry in craft.entries.section('sectionname')` to 1 by appending `.limit(1)`
Answers.UserDisplayName: justussimon91
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-07T14:30:11.010Z
Answers.LastActivityDate: 2016-11-07T15:36:20.203Z
Answers.LastEditDate: 2016-11-07T15:36:20.203Z
Answers.UserDisplayName: mike-orez
Body: <p>I'm currently trying to create a for-loop that loops through all options of a dropdown field created in Craft.</p>
  
  <p>I have a field called "Season", with the possible options to choose from being "2015/16" and "2016/17". What I'm trying to do now is to create a loop that would loop as many times as there are options available in that field.</p>
  
  <p>I'm thinking of something like this:  </p>
  
  <pre><code>{% for option in fields.season %}
      ...code...
  {% endfor %}`
  </code></pre>
  
  <p>Is there a way to accomplish this within Craft?</p>
  
Tags: <field><forloop><loop>
Title: Loop through all possible options of a Dropdown-field
ThreadText: # Loop through all possible options of a Dropdown-field
  
  (Asked by: username_0 on 2016-11-07)
  
  I'm currently trying to create a for-loop that loops through all options of a dropdown field created in Craft.
  
  I have a field called "Season", with the possible options to choose from being "2015/16" and "2016/17". What I'm trying to do now is to create a loop that would loop as many times as there are options available in that field.
  
  I'm thinking of something like this:
  
  ```
  {% for option in fields.season %}
      ...code...
  {% endfor %}`
  
  ```
  
  Is there a way to accomplish this within Craft?
  
  **Tags:** field, forloop, loop
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-11-07. Score: 2 | Accepted answer
  
  ```
  {% for option in entry.dropdownFieldHandle.options %}
      <li>{{ option }}</li>
  {% endfor %}
  
  ```
  
  That should be it :)
  
  ```
  {% for entry in craft.entries.section('sectionname') %}
    {% for option in entry.dropdownFieldHandle.options %}
      <li>{{ option }}</li>
    {% endfor %}
  {% endfor %}
  
  ```
  
  Use the above if it is only one page
  
  ```
  {% set myArray = [] %}
  
  {% for entry in craft.entries.section('sectionname') %}
    {% for option in entry.dropdownFieldHandle.options %}
          {% set value = option %}
  
          {% set myArray = myArray|merge([value]) %}
    {% endfor %}
  {% endfor %}
  
  ```
  
  And loop over that variable , better to load 1 variable as array if you need it over multiple pages. Just make sure all pages have access to this variable (or create a macro for it)
  
  > **Comments:**
  > **username_1**: also if you want the fields in general use the following:  `{% set dropdown = craft.fields.getFieldByHandle('season') %}  {% for option in dropdown.options %}  {{ option }} {% endif %}`  
  > **username_0**: I'd guess you meant the last `{% endif %}` to be a `{% endfor %}`, but even then craft gives me the error that there is no scope called "options".  
  > **username_1**: I edited my answers, one of the solutions should work.  
  > **username_0**: Your first code snipped does not produce any output at all for me. The second does, but outputs every season as often as there are entries in the section I chose for `'sectionname'` instead of just once as required. Still appreciated :)  
  > **username_0**: I got it solved by just limiting the `for entry in craft.entries.section('sectionname')` to 1 by appending `.limit(1)`  
  
  ---
  
  