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

CC BY-SA 4.0
2019-05-18T09:08:22.023Z
just that easy. Thanks!
Markus
CC BY-SA 4.0
2019-05-17T14:26:45.450Z
2019-05-17T14:26:45.450Z
Steve Rowling
<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>

<craft3><plugin-supertable><frontend-form>
Front End Dropdown Field from Super Table
# 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.)

    Visibility:
    
      Privat
      Public
    


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.
Something like this should work if entry is populated:

    Visibility:
    
      {% for option in entry.static.visibility.options %}
         {{ option.label }}
      {% endfor %}

> **Comments:**
> **username_0**: just that easy. Thanks!  

---

