Answers.Body: <p>You should be able to do this in the same way as for a dropdown field in Craft <a href="https://docs.craftcms.com/v3/dropdown-fields.html#working-with-dropdown-field-data" rel="nofollow noreferrer">as described in the docs</a>.</p>
  
  <p>Something like this should work if <code>entry</code> is populated:</p>
  
  <pre><code>&lt;li&gt;
      &lt;label for="fields[{{ fieldHandle }}][{{ block.id }}][fields][visibility]"&gt;Visibility:&lt;/label&gt;
      &lt;select name="fields[{{ fieldHandle }}][{{ block.id }}][fields][visibility]"&gt;
        {% for option in entry.static.visibility.options %}
           &lt;option value="{{ option.value }}"{% if option.selected %} selected{% endif %}&gt;{{ option.label }}&lt;/option&gt;
        {% endfor %}
      &lt;/select&gt;
  &lt;/li&gt;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-18T09:08:22.023Z
Answers.Text: just that easy. Thanks!
Answers.UserDisplayName: Markus
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-17T14:26:45.450Z
Answers.LastActivityDate: 2019-05-17T14:26:45.450Z
Answers.UserDisplayName: Steve Rowling
Body: <p>I have a single static Super Table Field with some Dropdown Fields.
  Is it possible to loop through the values instead of hardcoding each one?
  My hardcoded version works without problems but i think a dynamic loop is better for the future.</p>
  
  <p>Here is one example: ('static' is the value of the Super Table btw.)</p>
  
  <pre><code>&lt;li&gt;
      &lt;label for="fields[{{ fieldHandle }}][{{ block.id }}][fields][visibility]"&gt;Visibility:&lt;/label&gt;
      &lt;select name="fields[{{ fieldHandle }}][{{ block.id }}][fields][visibility]"&gt;
        &lt;option value="privat"{% if entry.static.visibility.value == "privat" %} selected{% endif %}&gt;Privat&lt;/option&gt;
        &lt;option value="public"{% if entry.static.visibility.value == "public" %} selected{% endif %}&gt;Public&lt;/option&gt;
      &lt;/select&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>Would be great, if someone has a idea! Thanks</p>
  
Tags: <craft3><plugin-supertable><frontend-form>
Title: Front End Dropdown Field from Super Table
ThreadText: # Front End Dropdown Field from Super Table
  
  (Asked by: username_0 on 2019-05-17)
  
  I have a single static Super Table Field with some Dropdown Fields.
  Is it possible to loop through the values instead of hardcoding each one?
  My hardcoded version works without problems but i think a dynamic loop is better for the future.
  
  Here is one example: ('static' is the value of the Super Table btw.)
  
  ```
  <li>
      <label for="fields[{{ fieldHandle }}][{{ block.id }}][fields][visibility]">Visibility:</label>
      <select name="fields[{{ fieldHandle }}][{{ block.id }}][fields][visibility]">
        <option value="privat"{% if entry.static.visibility.value == "privat" %} selected{% endif %}>Privat</option>
        <option value="public"{% if entry.static.visibility.value == "public" %} selected{% endif %}>Public</option>
      </select>
  </li>
  
  ```
  
  Would be great, if someone has a idea! Thanks
  
  **Tags:** craft3, plugin-supertable, frontend-form
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-05-17. Score: 1 | Accepted answer
  
  You should be able to do this in the same way as for a dropdown field in Craft [as described in the docs](https://docs.craftcms.com/v3/dropdown-fields.html#working-with-dropdown-field-data).
  
  Something like this should work if `entry` is populated:
  
  ```
  <li>
      <label for="fields[{{ fieldHandle }}][{{ block.id }}][fields][visibility]">Visibility:</label>
      <select name="fields[{{ fieldHandle }}][{{ block.id }}][fields][visibility]">
        {% for option in entry.static.visibility.options %}
           <option value="{{ option.value }}"{% if option.selected %} selected{% endif %}>{{ option.label }}</option>
        {% endfor %}
      </select>
  </li>
  
  ```
  
  > **Comments:**
  > **username_0**: just that easy. Thanks!  
  
  ---
  
  